Resolve npm audit critical & high vulnerabilities#6229
Open
pawelangelow wants to merge 9 commits into
Open
Conversation
Remove four overrides whose parent packages already resolve to safe, non-vulnerable versions on their own, so the pins were dead weight: - webpack-bundle-analyzer > ws - msw > path-to-regexp - cross-spawn - vite > esbuild Verified via an isolated fresh-install comparison: removing these produces zero change in `npm audit` (25 total / 14 production, all resolved versions patched). semver and form-data overrides are kept as they still act as de-duplication pins. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The existing `rawproto > protobufjs: ^7.2.5` override resolved to protobufjs 7.3.0, which is still within the vulnerable range (<=7.6.2) for a set of advisories including a critical arbitrary-code-execution issue (GHSA-xq3m-2v4x-88gg). Bump the override to `^7.6.5` (latest patched 7.x) rather than protobufjs 8.x or rawproto@1.0.3, staying in the major the override already validated as compatible with rawproto's usage. Clears the protobufjs critical and the dependent rawproto high; production audit now reports 0 critical. Verified rawproto's decoding still works: valueFormatters.spec.ts (81 tests, incl. protobuf vector decoding) passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`jsonpath` was a direct root dependency (added 2022) with no references anywhere in first-party source (ui, api, desktop, or workbench plugins) and no other package depending on it. Its only transitive dependency, `underscore`, was carried solely for it. Removing `jsonpath` and `@types/jsonpath` clears two high-severity production advisories at once: - jsonpath: arbitrary code injection via unsafe JSON path evaluation - underscore: unbounded recursion DoS in _.flatten / _.isEqual Production audit: 12 -> 10 (highs 5 -> 3). API type-check reports no new errors; jsonpath is not imported in any first-party code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The socket.io-client -> engine.io-client -> ws chain resolved ws to 8.17.1, vulnerable to an uninitialized-memory disclosure (<8.20.1) and a memory-exhaustion DoS (<8.21.0). engine.io-client 6.6.6 declares `ws: ~8.21.0` (6.6.1 pinned ~8.17.1), and socket.io-client@4.8.3 already allows it (~6.6.1). So a plain `npm update engine.io-client` bumps the transitive to 6.6.6 and ws to 8.21.1 - no override needed. Clears the production ws high and the engine.io-client moderate. Production audit: 10 -> 8 (highs 3 -> 2). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The GHSA-hmw2-7cc7-3qxx CRLF-injection advisory was extended to cover form-data 4.0.5 (now affects <4.0.6), so the existing `form-data: ^4.0.4` override was pinning a floor below the fix and the tree resolved to the still-vulnerable 4.0.5. Bump the override to ^4.0.6, keeping its de-duplication role while forcing the patched version across the tree. Clears the form-data high in both production and dev. Production audit: 8 -> 7 (highs 2 -> 1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
picomatch resolved to 2.3.1 via styled-components -> babel-plugin-styled-components, vulnerable to a method-injection glob bug (GHSA-3v7f-55p6-f55p) and a ReDoS (GHSA-c2c7-rcm5-vvqj), both fixed in 2.3.2. babel-plugin-styled-components already allows it (picomatch: ^2.3.1), so `npm update picomatch` bumps the locked 2.3.1 to 2.3.2 with no override and no styled-components v6 upgrade. Clears the last production high. Production audit: 7 -> 6 (now 0 critical, 0 high; 6 moderate remain). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two dev-only transitive advisories, both stale lockfile pins with in-range patched versions available (no overrides needed): - shell-quote (critical, GHSA newline-escape): concurrently allows ^1.8.1; bump 1.8.1 -> 1.10.0. - ws (high, memory-exhaustion DoS <7.5.11): webpack-bundle-analyzer allows ^7.3.1; bump the dev copy 7.5.10 -> 7.5.12. Clears the last dev-only critical. Full audit: 18 -> 16 (0 critical). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Upgrade the dev-only lint plugin from 2.0.4 to 4.2.0 to clear its high-severity advisory (and drop the stale eslint-plugin-import / @babel/core / ajv sub-tree it bundled). Verified non-breaking: eslint 8.57 satisfies the v4 peer range, all six sonarjs rules configured in .eslintrc.js still exist in v4, and a full no-cache `eslint .` run reports zero problems (the config enables only those six rules, not the recommended preset). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The dev build tool copyfiles -> glob@7 pulled minimatch@3.1.2, vulnerable to several ReDoS advisories (<3.1.4). glob declares minimatch ^3.1.1, so `npm update minimatch` bumps the locked 3.1.2 to 3.1.5 with no override. Clears the last high-severity advisory. No critical or high findings remain in either the production or full dependency tree. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
valkirilov
approved these changes
Jul 17, 2026
Contributor
Code Coverage - Backend unit tests
Test suite run success3684 tests passing in 321 suites. Report generated by 🧪jest coverage report action from 50bf8f7 |
Contributor
Code Coverage - Frontend unit tests
Test suite run success7829 tests passing in 865 suites. Report generated by 🧪jest coverage report action from 50bf8f7 |
Contributor
Code Coverage - Integration Tests
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Clears every
criticalandhigh-severitynpm auditfinding across both theproduction and full dependency trees. All remaining findings are
moderate.Approach, most→least common:
npm updatewhere the parent alreadyallowed a patched version - no overrides added (ws/engine.io-client,
picomatch, shell-quote, dev ws, minimatch).
overridesalready in the repo (protobufjs → 7.6.5,form-data → 4.0.6).
jsonpath(dead since ~2022), which alsodropped
underscore.(cross-spawn, vite>esbuild, msw>path-to-regexp, wba>ws).
eslint-plugin-sonarjs2 → 4 (major).Not addressed (all moderate, left for follow-up): the Sentry/OpenTelemetry
chain and the
@elastic/eui/uuidpair (the latter resolves with thein-progress EUI → Redis UI migration).
Testing
npm audit/npm audit --omit=devverified after each change (0 critical, 0 high).valueFormatterssuite (81 tests, incl. protobuf decoding) passes on protobufjs 7.6.5.eslint .passes with sonarjs 4 (zero new violations).Note
Medium Risk
Removing
jsonpathand major-bumpingeslint-plugin-sonarjschange lint behavior and dependency surface; protobuf/form-data overrides affect runtime decoding and HTTP clients but were validated by existing tests.Overview
Clears critical and high
npm auditfindings by updating the lockfile and trimmingpackage.jsondependencies and overrides.Dependency changes: Removes unused
jsonpathand@types/jsonpath(no remaining imports). Bumpseslint-plugin-sonarjsfrom 2.x to 4.2.0, which drops the old bundled Babel/TypeScript-eslint stack and uses a slimmer rule set (e.g.jsx-ast-utils-x).Overrides: Tightens
rawproto→protobufjsto ^7.6.5 andform-datato ^4.0.6. Removes overrides that no longer affect resolution (cross-spawn,vite→esbuild,msw→path-to-regexp,webpack-bundle-analyzer→ws).Lockfile: Refreshes transitive pins (e.g.
engine.io-client,ws,protobufjs,minimatch,picomatch) so patched versions resolve without extra overrides.Reviewed by Cursor Bugbot for commit 50bf8f7. Bugbot is set up for automated code reviews on this repo. Configure here.