Repository navigation
chore(deps): refresh lockfile and override vulnerable transitive build deps - #157
Conversation
…d deps npm update within existing ranges, plus overrides for tinypool (^2.2.0), serialize-javascript (^7.1.4) and uuid (^11.1.1), which Docusaurus 3.10.2 (latest) still pins to vulnerable versions via @docusaurus/core, @docusaurus/bundler and webpack-dev-server/sockjs. npm audit: 43 -> 5 (all low; deepmerge has no upstream fix). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Change-Id: I44d48971200e5465c46c8092f6bea6c579380c16
|
No actionable comments were generated in the recent review. Summary
Change: Other Merge Risk:
|
|
Claude finished @krassx's task in 1m 57s —— View job Review of PR #157: dependency security refresh
What I ran (Node 22.23.4, locally)
Findings (2 inline, both P3 Low)
I found no earlier review comments, so nothing is repeated here. Summary
|
| "overrides": { | ||
| "tinypool": "^2.2.0", | ||
| "serialize-javascript": "^7.1.4", | ||
| "uuid": "^11.1.1" | ||
| } |
There was a problem hiding this comment.
Severity: P3 Low
Problem: These three overrides are global, so they apply to every dependent in the tree. Today the only affected parents are @docusaurus/core (tinypool), copy-webpack-plugin and css-minimizer-webpack-plugin (serialize-javascript), and sockjs (uuid). The overrides also force major-version jumps (tinypool 1→2, serialize-javascript 6→7, uuid 8→11) with no scoping.
Impact: A later npm update or new dependency that needs the old major of one of these packages will be silently forced onto the new one, with no peer or resolution warning. The failure would then show up only at build time. Nothing in the repo reminds anyone to remove the overrides once Docusaurus ships new pins.
Scenario: A future Docusaurus minor still declares tinypool@^1, but its SSG code changes to use a v1-only option. The override keeps tinypool at 2.x and the build breaks, with no hint that the override is the cause.
Fix: Optionally scope each override to its parent, for example "@docusaurus/core": { "tinypool": "^2.2.0" }, "copy-webpack-plugin": { "serialize-javascript": "^7.1.4" }, and so on. Alternatively, leave a TODO or tracking issue to drop the overrides when Docusaurus bumps its pins. package.json has no comment field, so a tracking issue or a note in the README is the practical option.
For reference, I ran npm ci, a full docusaurus build, typecheck and cspell on the branch, and all passed. The build used the tinypool 2 thread pool (4 threads), and uuid@11 still works through require('uuid').v4, which is how sockjs calls it. So this is a maintainability note, not a defect.
| @@ -52,5 +52,10 @@ | |||
| }, | |||
| "engines": { | |||
| "node": ">=20.0" | |||
There was a problem hiding this comment.
Severity: P3 Low
Problem: The refreshed lockfile now resolves cheerio@1.2.0 (under docusaurus-search-local) and undici@7.30.1, both of which declare node >=20.18.1. Here engines.node is still >=20.0.
Impact: Node 20.0 to 20.17 now satisfies the repo's declared range but not these dependencies. A contributor on one of those versions could hit engine warnings, or errors under engine-strict, or runtime errors.
Scenario: A contributor with an older Node 20.x runs npm ci followed by npm run build. CI is unaffected, because actions/setup-node with node-version: 20 resolves to the latest 20.x.
Fix: Optionally raise engines.node to >=20.18.1. CLAUDE.md's "Node >= 20" note could stay as is, or be updated to match.
…to 20.18.1 Address review findings on #157: - scope tinypool/serialize-javascript/uuid overrides to the dependents that pin the vulnerable versions, so unrelated future dependents are not silently forced onto a new major - raise engines.node to >=20.18.1 to match cheerio 1.2.0 / undici 7.30.1 in the lockfile (CLAUDE.md updated to match) npm audit unchanged: 5 low (deepmerge). build, typecheck, cspell pass. Human guided, AI implemented Change-Id: I10ae9daae724e3166e9a3c7e7ad049059dde50ad
Human guided, AI implemented Change-Id: I8833066bc6e8631343afbbdea408a014a5661fe0
|
Addressed both review findings (6020b41, plus a README sync):
Re-verified: Human guided, AI implemented |
|
Claude finished @krassx's task in 47s —— View job Re-review of PR #157 after the latest pushes
Earlier findings: both fixed
What I ran this time (Node 24.22.1, locally)
New findingsNone. Summary
|
Why
Dependabot reports 47 open alerts (18 critical, 19 high) on
package-lock.json. All are transitive build/dev tooling — none ship in the static site. Root deps are already at latest (Docusaurus 3.10.2), so the alerts cannot be cleared by bumping root packages (only TypeScript 7 is newer, unrelated to the alerts).What
npm updateinside existing semver ranges: clears most of nanoid, postcss, ws, qs, body-parser, path-to-regexp, picomatch, launch-editor, joi, shell-quote, @babel/*, websocket-driver, follow-redirects, etc.overridesfor the three that Docusaurus 3.10.2 still pins to vulnerable versions:tinypool1.1.1 → ^2.2.0 (critical, via @docusaurus/core)serialize-javascript6.0.2 → ^7.1.4 (high, via @docusaurus/bundler: copy-webpack-plugin, css-minimizer-webpack-plugin)uuid→ ^11.1.1 (moderate, via sockjs/webpack-dev-server)Result
npm audit: 43 → 5, all low, remaining =deepmerge(@svgr), which has no patched upstream version.Verified
npm run buildsucceeds (560 HTML pages),npm run typecheckclean, cspell clean.Review note
Overrides cross major versions (tinypool 1→2, serialize-javascript 6→7); the build passes, but remove them once Docusaurus ships updated pins. Not touched: Dependabot PR #10 (TypeScript 7 major, draft).
🤖 Generated with Claude Code