deps: clear 40 of 54 audit findings via targeted overrides - #9
Open
mnaamani wants to merge 1 commit into
Open
Conversation
npm audit fix --force is unusable on this repo: it "fixes" by DOWNGRADING out of the vulnerable range (pear-electron-forge-maker-appimage -> 0.0.0, flatpak -> 0.0.4, expo 55 -> 53, react-native 0.83 -> 0.72, plus an "undefined to undefined" change) and still leaves most highs. Plain `npm audit fix` is a no-op here — every finding is transitive and pinned by its parent. So this bumps them through the root overrides block instead, using npm's name@major selector so each major line takes a patch bump rather than being force-marched across majors (brace-expansion needed 1.1.18/2.1.4/5.0.9, js-yaml 3.15.1/4.3.1, undici 6.28.0/7.29.0). app-builder-lib is a direct devDependency, which npm refuses to override by literal version, so it uses the "$name" form with its declared range raised to ^26.15.7 (26.15.3 — the current dist-tag latest — is itself in the advisory range, 26.15.4+ is not). Also regenerates the lock from scratch: an incremental install left the mobile workspace's subtree (expo -> postcss/nanoid, @expo/cli -> js-yaml) on the old versions. The committed lock also had drifted off the existing axios/ws overrides (axios 1.15.0, ws 8.17.1); the regenerate restores them. 54 -> 14 findings, all 26 moderates gone. The 14 that remain are documented in TODO.md: 13 chain to image-size, which has NO fixed version at any release and is build-tooling-only (appdmg, metro), and 1 is Electron — see below. Electron is deliberately NOT bumped. 41.10.4 clears its advisory and passes npm test, npm run lint AND npm run make, but the app is broken: the Bare worker never boots (no seeds, no corestore, nothing logged even with ELECTRON_ENABLE_LOGGING=1). Verified A/B against a 40.10.6 control. Only launching the app catches it. Verified on this tree: app boot (seeds + corestore), npm test, npm run lint, npm run make, and the 8-peer local-DHT e2e (34/34 asserts) — all green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Clears the high/moderate-severity dependency vulnerabilities: 54 → 14 findings, all 26 moderates gone.
Why not
npm audit fix --forceIt is unusable on this repo. npm counts any version outside the vulnerable range as a fix — including going backwards — so
--forceproposes:pear-electron-forge-maker-appimage→ 0.0.0, flatpak → 0.0.4 (stub versions)expo55 → 53,react-native0.83 → 0.72 (would destroy the mobile app)undefined to undefinedchange…and still leaves most highs. Plain
npm audit fixis a no-op here: every finding is transitive and pinned by its parent.What this does instead
Bumps them through the root
overridesblock, using npm'sname@majorselector so each major line takes a patch bump rather than being force-marched across majors:brace-expansionjs-yamlundiciapp-builder-lib$app-builder-lib, declared range raised to^26.15.7builder-util-runtimefast-uriip-addressnanoidpostcsstarTwo gotchas worth knowing:
app-builder-libis a direct devDependency, which npm refuses to override by literal version (EOVERRIDE) — hence the$nameform. Note its current dist-taglatest(26.15.3) is itself in the advisory range; 26.15.4+ is not.npm installleft themobileworkspace's subtree (expo→postcss/nanoid,@expo/cli→js-yaml) on the old versions. The committed lock had also drifted off the existingaxios/wsoverrides (axios 1.15.0, ws 8.17.1) — the regenerate restores them.Mobile is covered:
postcss8.5.16→8.5.26,nanoid3.3.15→3.3.18,js-yaml4.3.0→4.3.1, plus the shared fixes.Electron is deliberately NOT bumped
41.10.4 clears its advisory and passes
npm test,npm run lintandnpm run make— but the app is broken: the Bare worker never boots (nowallet.seed.enc/swarm.seed.enc, no<storage>/hyperwavecorestore, and nothing logged even withELECTRON_ENABLE_LOGGING=1). The renderer window opens but never reachesrenderer/lib/ipc.js'sstartWorker, so main'sclient.call('init', …)never runs. Verified A/B against a 40.10.6 control. Only launching the app catches this — worth a boot smoke test before anyone retries.The 14 remaining findings
image-size, which has no fixed version at any release (latest 2.0.2 is vulnerable). Build-tooling only —appdmg(DMG packaging) and Metro (mobile bundler); nothing that ships.electron, per above.Both documented in
TODO.md§ Dependency watch, along with a warning not to run--forcehere.Verification
All green on this tree: app boot (seeds + corestore written),
npm test,npm run lint,npm run make, and the 8-peer local-DHT e2e (34/34 asserts).🤖 Generated with Claude Code