chore(deps): resolve dependency vulnerabilities (2026-08-17) - #469
chore(deps): resolve dependency vulnerabilities (2026-08-17)#469tkislan wants to merge 3 commits into
Conversation
`better-npm-audit audit` was failing because all four .nsprc accepted-risk entries expired on 2026-08-15, not because new advisories landed. Re-assessing each one showed three of the four rationales had gone stale: fixes were published after the notes were written. Those three are now fixed for real rather than re-suppressed, leaving one genuine accepted risk. - @tootallnate/once (GHSA-vpq2-c234-7xj6, low) -> override "2.0.1". 2.0.1 is a backport published 2026-05-03, after the note claiming no fix existed. All three copies are production, not dev-only as the note said: the 1.1.2 copy is reached via @deepnote/sql-language-server -> sqlite3 -> node-gyp -> make-fetch-happen, not only via @vscode/test-electron. A plain pin also moves that 1.1.2 copy across a major; every consumer in the tree is http-proxy-agent calling once(socket, 'connect') at dist/agent.js:139 with the resolved value discarded, so the 1.x->2.x deltas (resolves args[] rather than args[0], drops .spread/.cancel) are inert. Not taken to 3.0.1: it is ESM-only and all consumers are CJS. - uuid (GHSA-w5hq-g745-h8pq, moderate) -> override "uuid@8": "11.1.1". The note's premise (only fix is >=11.1.1) was right; its conclusion that this is unsafe was not. 11.1.1 still ships a real CJS build and its export surface is a superset of 8.3.2's; all five consumers call v4() with no buf argument, which is the unaffected path. Pinned to 11.1.1 specifically because 12.0.1 and later are ESM-only. Ranged key mirrors the existing "js-yaml@3" entry, which likewise coexists with a newer direct dependency (uuid stays at ^13.0.2). - @opentelemetry/core (GHSA-8988-4f7v-96qf, moderate) -> bump the direct dependency @vscode/extension-telemetry ^0.7.7 -> ^0.9.9. No 1.x backport exists (fix is 2.8.0), so no override was possible. 0.9.0 is where applicationinsights was dropped, taking @opentelemetry/core, sdk-trace-base and resources with it, so this removes the advisory and three chained entries instead of suppressing them. Needs no source edits: 0.9.9 keeps the default export and every API used here; only 1.0.0+ removes it. engines.vscode is unchanged at ^1.75.0. - elliptic (GHSA-848j-6mx2-7j84, low) -> accepted risk renewed, expiry 2026-09-17. The only entry with no remediation available: the advisory range is <=6.6.1 and 6.6.1 is the latest published version, so no override or lockfile bump can move it. Notes corrected to add the create-ecdh path the previous revision omitted and to record why it is unreachable — node-stdlib-browser is dev-only and its polyfill plugin is gated to the web test entry, which .vscodeignore excludes from the VSIX. The .nsprc note for @opentelemetry/core also asserted that telemetry is disabled so the propagator is never exercised. That was false and is worth recording: isTelemetryDisabled() does not gate the send path — sendTelemetryEvent gates on isTelemetrySupported(), which always constructs the reporter. The advisory was still not exploitable here (the vulnerable code is the inbound W3CBaggagePropagator.extract() parse and this extension has no inbound listener), but the risk had been accepted on the wrong grounds. Verified: both `better-npm-audit audit` and `--production` exit 0; the tree holds no @opentelemetry/core, applicationinsights or uuid@8.3.2; tsc and the 2545-test unit suite pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QzZUkUqhSi8H8mvCpfEftt
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #469 +/- ##
===========================
===========================
🚀 New features to boost your workflow:
|
|
Caution Review failedAn error occurred during the review process. Please try again later. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: 0 reviews are currently available. Based on recent review activity, included reviews refill at 2 per hour. 📝 WalkthroughWalkthroughThe package manifest updates Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This PR updates vulnerable transitive dependencies, bumps telemetry dependencies, and renews one documented accepted risk while preserving existing source behavior. The supplied checks pass, and no actionable merge-blocking risk remains beyond normal review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
Comment |
…se build
The 0.9.9 bump in the previous commit broke `compile-release` and `compile`:
node_modules/@vscode/extension-telemetry/dist/node/common/appInsightsClientFactory.js:31:45:
ERROR: Could not resolve "@microsoft/applicationinsights-common"
0.9.9 imports @microsoft/applicationinsights-common in three of its dist files
but never declares it. It resolved for other consumers only because
@microsoft/applicationinsights-web-basic used to pull it in transitively;
web-basic 3.4.x dropped it, and the caret range ^3.3.4 resolves to 3.4.3 here,
so the import has nothing to resolve against. Every release from 0.9.0 through
1.4.0 carries the same undeclared import. 1.5.2 is the first that declares
@microsoft/applicationinsights-common and applicationinsights-core-js
explicitly, so it is the only version whose declared dependencies match what it
imports.
1.0.0 replaced `export default class TelemetryReporter` with a named export,
which costs three call-site edits plus one in the test loader:
- src/platform/telemetry/index.ts, src/test/testHooks.node.ts: default import
-> named import.
- src/test/unittests.ts: the CJS Module._load hook returns the mock under
`TelemetryReporter` rather than `default`.
- build/mocha-esm-loader.js: the loader synthesises the telemetry mock module
and exported it only as a default, so `import { TelemetryReporter }` failed
ESM instantiation with "does not provide an export named 'TelemetryReporter'"
even though the real package lexes fine. It now exports the named binding,
matching 1.5.2's actual shape.
The advisory outcome is unchanged: applicationinsights and the whole
@opentelemetry subtree stay out of the tree, so GHSA-8988-4f7v-96qf and its
three chained entries remain resolved rather than suppressed.
Verified: `npm run compile-release` and `npm run compile` (the exact commands
the three failing jobs run) exit 0; both audit gates exit 0; tsc exits 0;
2545 unit tests pass, unchanged from before this series.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QzZUkUqhSi8H8mvCpfEftt
The root override added for GHSA-vpq2-c234-7xj6 never reached the VSIX: buildSqlLanguageServer() runs an isolated `npm install` for dist/sql-lsp-modules and copies only the pins named in sqlLspOverridesToPropagate, so the shipped tree kept resolving @tootallnate/once@1.1.2 via sqlite3 -> node-gyp -> make-fetch-happen -> http-proxy-agent. Verified with a full `npm run esbuild-all`: dist/sql-lsp-modules now installs 2.0.1 (was 1.1.2), and an audit of the reproduced tree goes from 5 low findings to 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QzZUkUqhSi8H8mvCpfEftt
npx better-npm-audit auditwas failing, but not because new advisories landed. All four.nsprcaccepted-risk entries expired on 2026-08-15, so the same four advisories that had been suppressed became visible again.Each was re-assessed independently against the current registry. Three of the four rationales had gone stale — fixes were published after those notes were written — so they are fixed for real here rather than re-suppressed. One genuine accepted risk remains.
Decisions
@tootallnate/once2.0.1uuiduuid@8→11.1.1@opentelemetry/core@vscode/extension-telemetry→^1.5.2elliptic2026-09-17@tootallnate/once→ override2.0.12.0.1is a backport published 2026-05-03, after the note claiming no fix existed. Two corrections to that note: all three copies are production, not dev-only — the1.1.2copy is reached through@deepnote/sql-language-server → sqlite3 → node-gyp → make-fetch-happen, not only via@vscode/test-electron.A plain pin also moves the
1.1.2copy across a major. That is safe here because every consumer in the tree ishttp-proxy-agentcallingonce(socket, 'connect')atdist/agent.js:139with the resolved value discarded, so the 1.x→2.x deltas (resolvesargs[]rather thanargs[0]; drops.spread/.cancel) are inert. Not taken to3.0.1: it is ESM-only and all consumers are CJS.uuid→ overrideuuid@8:11.1.1The old note's premise (only fix is
>=11.1.1) was right; its conclusion that this is unsafe was not.11.1.1still ships a real CJS build (main: ./dist/cjs/index.js) and its export surface is a superset of8.3.2's. All five consumers callv4()with nobufargument — the explicitly unaffected path.Pinned to
11.1.1specifically because12.0.1and later are ESM-only. The ranged key mirrors the existing"js-yaml@3"entry, which likewise coexists with a newer direct dependency —uuidstays at^13.0.2, which was never in range.+ "uuid@8": "11.1.1"@opentelemetry/core→ bump@vscode/extension-telemetryto^1.5.2No 1.x backport exists (the fix is
2.8.0), so no override was possible — forcing core to 2.x breaksapplicationinsights@2.5.0, which calls symbols removed in otel 2.x. Bumping the direct dependency past0.9.0dropsapplicationinsightsand with it@opentelemetry/core,sdk-trace-baseandresources, so this removes the advisory and three chained entries instead of suppressing them.^1.5.2specifically, because every release from0.9.0through1.4.0has an undeclared dependency: they import@microsoft/applicationinsights-commonwithout declaring it, relying onapplicationinsights-web-basicto supply it transitively. web-basic3.4.xdropped it, so those versions fail to bundle:1.5.2is the first release whose declared dependencies match what it imports.engines.vscodeis unchanged at^1.75.0.1.0.0replacedexport default class TelemetryReporterwith a named export, which costs four mechanical edits:That last one is the non-obvious one: the test loader synthesizes the telemetry mock as source and exported it only as a default, so
import { TelemetryReporter }failed ESM instantiation with "does not provide an export named 'TelemetryReporter'" — even though the real package lexes fine. It now matches1.5.2's actual shape.elliptic→ accepted risk renewedThe only entry with no remediation available: the advisory range is
<=6.6.1and 6.6.1 is the latest published version, so no override or lockfile bump can move it. It is dev-only and absent from the production tree.Notes corrected to add the
create-ecdhpath the previous revision omitted, and to record why it is unreachable:node-stdlib-browseris a devDependency whose polyfill plugin is gated to the web test entry (build/esbuild/build.ts), whose output.vscodeignoreexcludes from the VSIX.The
.nsprcnote for@opentelemetry/coreasserted that telemetry is disabled so the propagator is never exercised. That was false.isTelemetryDisabled()(src/platform/telemetry/index.ts:39-41) does not gate the send path —sendTelemetryEventgates onisTelemetrySupported(), which always constructs the reporter, so App Insights events are sent in production.The advisory was still not exploitable here (the vulnerable code is the inbound
W3CBaggagePropagator.extract()parse, and this extension has no inbound listener), but the risk had been accepted on the wrong grounds. Since PostHog is now the live analytics path, deleting the App Insights path outright would remove this dependency class permanently — flagged, not done here.Verification
All run locally on this branch:
npm run compile-release→ exit 0 (the exact command the 3 build jobs run)npm run compile→ exit 0npx better-npm-audit audit→ exit 0npx better-npm-audit audit --production→ exit 0npm run compile-tsc→ exit 0npm run test:unittests→ 2545 passing, 0 failing (unchanged from baseline)@opentelemetry/core,applicationinsightsanduuid@8.3.2are gone;@tootallnate/onceresolves to a single2.0.1Not verified:
1.5.xsends through the 1DS channel rather than the Node App Insights SDK. Worst realistic failure is App Insights events silently stopping — low impact given PostHog is the live analytics path, but it is not observable without checking the AI dashboard.Fully reversible — revert the files and
npm install. No migration.🤖 Generated with Claude Code
https://claude.ai/code/session_01QzZUkUqhSi8H8mvCpfEftt