Skip to content

chore(deps): remediate known vulnerabilities in Go, npm, and base images - #214

Merged
ricCap merged 1 commit into
mainfrom
chore/fix-security-vulnerabilities
Aug 20, 2026
Merged

ricCap merged 1 commit into
mainfrom
chore/fix-security-vulnerabilities

Conversation

@ricCap

@ricCap ricCap commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Sweep of both dependency trees plus the container base images, driven by govulncheck and npm audit.

Go validator — 12 reachable vulnerabilities → 0

  • golang.org/x/net v0.38.0 → v0.58.0 (IDNA punycode host confusion GO-2026-5026, HTTP/2 SETTINGS infinite loop GO-2026-4918) and golang.org/x/text v0.23.0 → v0.41.0 (GO-2026-5970). x/net needs a newer language version, so the go directive moves 1.23.0 → 1.25.0.
  • Builder image golang:1.23-alpine3.21 → golang:1.26-alpine3.24. This is what fixes the standard-library half — the shipped binary's stdlib comes from the builder image, and the crypto/tls, crypto/x509, net/http, net/url, encoding/asn1, mime and net/textproto fixes land in 1.26.3–1.26.6. Bumping only the modules would have left 11 of the 12 findings in place.

Verified against the toolchain the new base image provides:

cd validator && GOTOOLCHAIN=go1.26.7 govulncheck ./...
→ No vulnerabilities found.

That also clears the imported-but-uncalled and required-module findings, not only the reachable ones.

Docs / npm — 37 → 17

npm audit fix resolved 20 within existing semver ranges, including all three criticals (vitest arbitrary file read via the UI server, shell-quote, websocket-driver) plus undici, ws, postcss, webpack-dev-server, js-yaml, brace-expansion, svgo, nanoid and qs.

Those fixes are also recorded in package.json so they survive a lockfile regeneration rather than living only in the lock: vitest → ^3.2.7, and the stale override floors postcss ^8.5.10 → ^8.5.26 and vite ^6.4.2 → ^6.4.3.

The 17 that remain have no fix

They are a single unfixable upstream advisory pair, counted once per inheriting package: image-size ICNS and JXL/HEIF parser infinite loops (GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq). The advisory range is * and the latest release (2.0.2) is still affected, so there is no version to pin to — the other 16 entries are just @docusaurus/* packages inheriting the flag.

Exposure here is low and I chose to leave it visible rather than paper over it: image-size enters only via @docusaurus/core → @docusaurus/mdx-loader, runs at build time against repo-controlled images, and never ships — the runtime image is nginx serving static files. Exploiting it would require first landing a malicious .icns/.jxl/.heif through a merged PR.

Base images and runtime floor

  • docs builder node:20.19-alpine3.21 → node:22-alpine3.24, and CI node-version 20 → 22. Node 18 and 20 are both past EOL, so engines.node moves >=18.0 → >=22.0 to match.
  • docs runtime nginx:1.27-alpine3.21 → nginx:1.31-alpine3.24. This stage ships, so it picks up current musl/openssl patches.

Verification

npm test (4 passed), npm run build, go build, go vet and go test all pass. The build's broken-anchor warnings in the Italian docs are pre-existing and unrelated.

Docker was unavailable locally, so the image builds themselves are unverified on my side — they are left to this PR's docs.yml and validator.yml runs, both of which build (without pushing) on pull_request. Worth confirming those go green before merge, since this PR moves three base images.

Reviewer notes

  • The go directive bump to 1.25.0 was forced by x/net, not chosen. Any other consumer of this module needs Go ≥ 1.25.
  • engines.node >=22.0 is stricter than before; contributors still on Node 20 will now get an npm warning.
  • Non-dependency findings I checked and deliberately did not change, since all three are documented deliberate decisions rather than defects: the account-admin-scoped aruba-creds mirrored into every participant vcluster (AGENTS.md accepts this with mandatory post-workshop rotation), the unauthenticated public /api/dashboard (mitigated by the 10s cache, validator: /api/dashboard is unauthenticated and can stampede every pair vcluster #113), and gitops/solo/rbac.yaml granting cluster-wide read on * — read-only, laptop-local k3d, and narrowing it would break the dynamic-client checks against arbitrary Crossplane CRDs. No committed credentials; no pull_request_target or untrusted interpolation in workflows.

🤖 Generated with Claude Code

Sweep of both dependency trees plus the container base images.

Go validator (govulncheck: 12 reachable vulnerabilities -> 0):

- Bump golang.org/x/net v0.38.0 -> v0.58.0 (IDNA punycode host
  confusion GO-2026-5026, HTTP/2 SETTINGS infinite loop GO-2026-4918)
  and golang.org/x/text v0.23.0 -> v0.41.0 (GO-2026-5970). x/net
  requires a newer language version, so the go directive moves
  1.23.0 -> 1.25.0.
- Bump the builder image golang:1.23-alpine3.21 -> golang:1.26-alpine3.24.
  This is what fixes the standard-library half of the findings: the
  shipped binary's stdlib comes from the builder, and the crypto/tls,
  crypto/x509, net/http, net/url, encoding/asn1, mime and net/textproto
  fixes land in 1.26.3-1.26.6.

Verified with `GOTOOLCHAIN=go1.26.7 govulncheck ./...` -> no
vulnerabilities found, which also clears the imported-but-uncalled and
required-module findings, not just the reachable ones.

Docs / npm (npm audit: 37 -> 17):

- `npm audit fix` resolved 20 within existing semver ranges, including
  all three criticals (vitest arbitrary file read via the UI server,
  shell-quote, websocket-driver) plus undici, ws, postcss,
  webpack-dev-server, js-yaml, brace-expansion, svgo, nanoid and qs.
- Record the fixes in package.json so they survive a lockfile
  regeneration rather than living only in the lock: vitest -> ^3.2.7,
  and refresh the stale override floors postcss ^8.5.10 -> ^8.5.26 and
  vite ^6.4.2 -> ^6.4.3.

The 17 remaining advisories are a single unfixable upstream pair
counted once per inheriting package: image-size ICNS and JXL/HEIF
parser infinite loops (GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq). The
advisory range is `*` and the latest release is still affected, so
there is no version to pin to. It enters only via
@docusaurus/core -> @docusaurus/mdx-loader, runs at build time against
repo-controlled images, and never ships -- the runtime image is nginx
serving static files.

Base images and runtime floor:

- docs builder node:20.19-alpine3.21 -> node:22-alpine3.24 and CI
  node-version 20 -> 22; Node 18 and 20 are both past EOL, so
  package.json engines moves >=18.0 -> >=22.0 to match.
- docs runtime nginx:1.27-alpine3.21 -> nginx:1.31-alpine3.24. This
  stage ships, so it picks up current musl/openssl patches.

npm test (4 passed), npm run build, go build, go vet and go test all
pass. Docker was unavailable locally, so the image builds themselves
are left to the PR's docs.yml and validator.yml runs.

Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
Assisted-by: claude-code/claude-opus-5
@ricCap
ricCap merged commit c865b8c into main Aug 20, 2026
7 checks passed
@ricCap
ricCap deleted the chore/fix-security-vulnerabilities branch August 20, 2026 12:18
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