Skip to content

chore(frontend): clear the dependency-audit backlog - #54

Merged
rancur merged 1 commit into
mainfrom
chore/npm-audit-backlog
Sep 23, 2026
Merged

rancur merged 1 commit into
mainfrom
chore/npm-audit-backlog

Conversation

@rancur

@rancur rancur commented Sep 23, 2026

Copy link
Copy Markdown
Owner

The "Dependency audit" check has failed on every PR since early September. pip-audit reports no Python vulnerabilities — all five advisories were frontend npm packages.

Why Dependabot couldn't fix this

Its PRs weren't broken. The Frontend job passed on all three (#48 browserslist, #49 vitest, #50 baseline-browser-mapping).

The gate is npm audit --audit-level=high run against the whole tree. Each Dependabot PR bumps one package, so every one of them still left the high-severity browserslist advisory in place and failed the audit job. No single-package PR could ever satisfy that gate — the advisories had to land together, which Dependabot cannot do on its own.

That's why three valid PRs sat unmerged for three weeks, and why every unrelated PR has shipped with a red check ever since. The normalisation of a permanently-failing check is the real cost here; the advisories themselves are mostly moderate.

The fix — minimum change, no --force, no major bumps

  • npm audit fix — resolved browserslist (high) and baseline-browser-mapping, lockfile-only transitives.
  • vitest@4.1.11 + @vitest/coverage-v8@4.1.11 — a patch bump inside the existing ^4.1.10 range, which npm audit fix alone left untouched.

Only frontend/package.json and frontend/package-lock.json changed. .github/workflows/ci.yml is untouched — making the check green by weakening the check would have been worse than leaving it red.

Verification

npm audit → 0 vulnerabilities (was 5: 1 high, 4 moderate). CI's own frontend commands run locally: npm ci ✓, npx tsc --noEmit ✓, npm run build ✓.

npm test was flaky in the sandbox, but it reproduced identically on unpatched main — CPU contention, with import times swinging 11s–200s for the same suite. Forced serial (--no-file-parallelism) it passed 30/30 three times on this branch. Pre-existing local artifact, not caused by these bumps; GitHub's runners already passed the Frontend job on all three Dependabot PRs.

Local Node was v25.8 against CI's Node 20 — noted, not expected to matter for a lockfile change.

Follow-up worth considering

Closing #48, #49 and #50 as superseded, and deciding whether the audit gate should be advisory rather than blocking — otherwise the next single-package advisory recreates the same deadlock.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UoFoJWJX28B7nM6HfriV7M

…e-browser-mapping)

The Dependency audit CI job has been red on every PR since early
September because npm audit's fail condition (npm audit --audit-level=high)
is evaluated against the whole tree, not just the files a PR touches.
Dependabot opens one PR per package, so a PR that only bumped vitest
(#49) or baseline-browser-mapping (#50) still failed the gate: the
unfixed browserslist advisories (GHSA-c83g-rgw3-j3cx, GHSA-73wf-gq98-2v4g,
high severity) were still present in the tree. This was not a build or
test regression from the Dependabot bumps themselves - the "Frontend
(typecheck, test, build)" job passed on all three open Dependabot PRs.

`npm audit fix` alone resolved browserslist and baseline-browser-mapping
(transitive, no manifest changes needed) but left the vitest family
(vitest, @vitest/mocker, @vitest/coverage-v8 - GHSA-82fw-gwwq-j7x9)
unresolved even though the fixed version (4.1.11) satisfies the existing
^4.1.10 semver range. Bumping vitest and @vitest/coverage-v8 to 4.1.11
directly closes it without any semver-major change.

npm audit now reports 0 vulnerabilities (was 5: 1 high, 4 moderate).
Verified: npx tsc --noEmit, npm test, npm run build all pass, matching
what the "Frontend (typecheck, test, build)" CI job runs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UoFoJWJX28B7nM6HfriV7M
@rancur
rancur merged commit 70fb496 into main Sep 23, 2026
5 checks passed
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