Skip to content

chore(deps): bump Docusaurus 3.10.2 + React 19 and k8s.io/x-net, clearing all criticals - #218

Merged
ricCap merged 2 commits into
mainfrom
chore/bump-deps-remediate
Oct 18, 2026
Merged

ricCap merged 2 commits into
mainfrom
chore/bump-deps-remediate

Conversation

@ricCap

@ricCap ricCap commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Why

npm audit in docs/ had drifted to 52 advisories (18 critical, 25 high, 9 moderate) — well past the 17 that #214 left — because nearly every @docusaurus/* package inherits from a core that was four minors behind. On the Go side, k8s.io/* sat at v0.30.3, four minors behind the v1.33 apiserver it talks to, and golang.org/x/net had five findings reachable from our own code.

Result

Before After
npm advisories 52 (18 critical, 25 high, 9 moderate) 28 (0 critical, 28 high, 0 moderate)
govulncheck (go1.26.9) 5 No vulnerabilities found

What changed

docs (b75351f)

  • @docusaurus/* 3.9.2 → 3.10.2. Clears all 18 criticals on its own, and resolves the two image-size advisories (GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq) that chore(deps): remediate known vulnerabilities in Go, npm, and base images #214 recorded as unfixable — upstream has since published image-size 2.0.4, which 3.10.2's mdx-loader picks up.
  • react / react-dom 18.3.1 → 19.3.1. Supported since Docusaurus 3.7; 3.10.2 declares react: "^18.0.0 || ^19.0.0".
  • Test stack: vitest 3→4, @vitejs/plugin-react 4→6, jsdom 26→29, @testing-library/jest-dom 6→7. plugin-react 6 requires vite ^8, so the vite override floor moves ^6.4.3 → ^8.3.4.
  • @easyops-cn/docusaurus-search-local → 0.55.3.
  • Overrides: added postcss-selector-parser ^7.1.6 and tinypool ^2.2.0 (advisories with no fixed dependent release); removed the esbuild override, which matched nothing once vite 8 moved to rolldown/oxc. Every remaining override was checked and still binds.
  • Cleared two deprecations: onBrokenMarkdownLinks moved under markdown.hooks, and vitest.config.js → .mjs.

validator (f4c25a1)

  • k8s.io/api|apimachinery|client-go v0.30.3 → v0.33.13, matching the cluster (Aruba v1.33.2, solo k3d v1.33.6). Deliberately not the newest v0.37.1, which would put the client four minors ahead and reintroduce the same skew from the other side.
  • golang.org/x/net v0.58.0 → v0.61.0, fixing five reachable http2 findings. go mod tidy raised the go directive 1.25.0 → 1.26.0, which the existing golang:1.26-alpine3.24 builder already satisfies.

The lockfile is regenerated, on purpose

It carried a stale react-helmet-async entry resolving to upstream 1.3.0 rather than the npm:@slorber/react-helmet-async alias @docusaurus/types declares. Only the fork supports React 19, and that exact entry is what blocked ionic-team/ionic-docs#4616. Worth spot-checking on review:

cd docs && npm ls react react-helmet-async image-size --all | head

Expect react@19.3.1, the @slorber fork, and image-size@2.0.4.

What is not fixed

All 28 remaining advisories are a single root: braces <=3.0.3, inherited through micromatch → fast-glob/globby/chokidar into the whole @docusaurus tree. braces' latest published release is 3.0.3, so there is no version to pin to and an override cannot help — the same shape the image-size problem had until upstream shipped a fix. It is build-time only; the runtime image is nginx serving static files.

28 entries here is one problem, not 28.

Verification

  • npm ci resolves clean, no peer errors
  • npm test 4/4 under vitest 4 + jsdom 29
  • docusaurus build --locale en succeeds with no warnings
  • go build, go vet, go test pass; govulncheck clean under go1.26.9
  • Site search checked in a browser against the production build, not just the build exit code — @easyops-cn/docusaurus-search-local has an open React 19 issue (#474) and 0.55.3 is unaffected: queries return highlighted results, console clean of React and hydration errors. The dashboard renders and degrades correctly without a validator backend.

Reviewer note

Four test-stack majors land together here. The argument for accepting them as one change is that none can reach the shipped site — Docusaurus builds with webpack, and that stack exists solely to run ValidateCheck.test.jsx. Happy to split them out if you'd rather.

🤖 Generated with Claude Code

…iticals

`npm audit` had drifted to 52 advisories (18 critical, 25 high, 9
moderate) — well past the 17 c865b8c left — because almost every
@docusaurus/* package inherits from a core that was four minors behind.

Bumps:

- @docusaurus/core, preset-classic, module-type-aliases, types
  3.9.2 -> 3.10.2. This alone clears the 18 criticals, and it also
  resolves the two image-size advisories (GHSA-w3rx-r6r6-pgpr,
  GHSA-5p2g-fcmc-qvqq) that were previously unfixable: 3.10.2's
  mdx-loader pulls image-size >= 2.0.4, which did not exist when we
  last looked. The "unfixable upstream" note on those is now wrong.
- react / react-dom 18.3.1 -> 19.3.1. Supported since Docusaurus 3.7;
  3.10.2 declares `react: "^18.0.0 || ^19.0.0"`.
- vitest 3.2.7 -> 4.1.12, @vitejs/plugin-react 4.7 -> 6.1.2,
  jsdom 26 -> 29, @testing-library/jest-dom 6 -> 7, and patch bumps for
  @testing-library/react and user-event. plugin-react 6 requires
  vite ^8, so the `vite` override floor moves ^6.4.3 -> ^8.3.4. None of
  this touches the shipped site: Docusaurus builds with webpack, and
  vite/vitest exist only for the component tests.
- @easyops-cn/docusaurus-search-local ^0.55.1 -> ^0.55.3.

The lockfile is regenerated rather than patched, deliberately. It had a
stale `react-helmet-async` entry resolving to upstream 1.3.0 instead of
the `npm:@slorber/react-helmet-async` alias that @docusaurus/types
declares; only the fork supports React 19, and that exact entry is what
blocked ionic-team/ionic-docs#4616. It now resolves to the fork.

Override changes. Added postcss-selector-parser ^7.1.6 and tinypool
^2.2.0 — both had advisories with no fixed dependent release, so the
floor has to be forced here; recorded in package.json rather than only
in the lock so they survive regeneration. Removed the `esbuild`
^0.25.0 override: vite 8 builds with rolldown/oxc and no longer pulls
esbuild at all, so that entry matched nothing in the tree. Every other
override was checked and still binds to an installed package.

Result: 52 -> 28 advisories, 0 critical, 0 moderate. All 28 remaining
are one root advisory, braces <=3.0.3, inherited through
micromatch/fast-glob/globby/chokidar into the @Docusaurus tree. braces'
latest published release *is* 3.0.3, so there is nothing to pin to —
the same shape as the old image-size problem. It is build-time only;
the runtime image is nginx serving static files.

Also cleared two deprecation warnings while here: `onBrokenMarkdownLinks`
moved under `markdown.hooks` (v4 removes the top-level option), and
vitest.config.js renamed to .mjs, since it uses ESM syntax and Vite is
making the native config loader the default.

Verified: npm ci resolves clean with no peer errors, npm test 4/4 under
vitest 4 + jsdom 29, `docusaurus build --locale en` succeeds with no
warnings. Site search was checked in a browser against the production
build, not just the build exit code — @easyops-cn/docusaurus-search-local
has an open React 19 issue upstream (easyops-cn/docusaurus-search-local#474)
and 0.55.3 is unaffected: queries return highlighted results, and the
console is clean of React and hydration errors. The dashboard page
renders and degrades correctly without a validator backend.

Assisted-by: claude-code/claude-opus-5
Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
…k clean)

Two separate problems in the validator's module graph.

k8s.io/api, apimachinery and client-go were pinned at v0.30.3 — four
minors behind the v1.33 apiserver they talk to, outside client-go's
supported skew. Moved to v0.33.13 to match the cluster (Aruba runs
v1.33.2, solo k3d runs v1.33.6) rather than to the newest v0.37.1,
which would put the client four minors *ahead* and reintroduce the same
skew from the other side. This pulled protobuf 1.33.0 -> 1.36.5 and
refreshed kube-openapi, utils, sigs.k8s.io/json and structured-merge-diff.

golang.org/x/net was at v0.58.0, which govulncheck flags with five
findings reachable from our code — all golang.org/x/net/http2, traced
through http.ListenAndServe and the client-go Secret GET in
vclientForPair. Fixed in v0.60.0; went to v0.61.0. That carried x/sys,
x/term and x/text along with it.

`go mod tidy` raised the go directive 1.25.0 -> 1.26.0, required by
x/net v0.61.0. The builder image is already golang:1.26-alpine3.24 and
CI builds the validator only through Docker (no setup-go step), so
nothing else needs to move.

On govulncheck numbers: scanning with the local toolchain is misleading
here, because the shipped binary's stdlib comes from the builder image,
not from the developer's machine — the same reasoning c865b8c used.
Local go1.26.2 reports 20 stdlib findings purely because it is behind;
go1.26.9, the current patch that golang:1.26-alpine3.24 resolves to,
reports **no vulnerabilities found** after this change. Before it, that
same toolchain reported 5.

go build, go vet and go test all pass.

Assisted-by: claude-code/claude-opus-5
Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
@ricCap
ricCap merged commit 808fc24 into main Oct 18, 2026
@ricCap
ricCap deleted the chore/bump-deps-remediate branch October 18, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant