Skip to content

fix(deps): patch react-router advisory and retire its stale exception - #267

Merged
parthrohit22 merged 1 commit into
Second-Origin:devfrom
parthrohit22:fix/dependency-audit-stale-exception
Aug 8, 2026
Merged

fix(deps): patch react-router advisory and retire its stale exception#267
parthrohit22 merged 1 commit into
Second-Origin:devfrom
parthrohit22:fix/dependency-audit-stale-exception

Conversation

@parthrohit22

Copy link
Copy Markdown
Collaborator

Summary

react-router 7.18.2 is the backported patch for GHSA-qwww-vcr4-c8h2 (high, runtime). The policy exception PARTHA carried for 7.18.1 therefore no longer has an advisory to accept, and the dependency-audit gate was correctly reporting it as stale.

This bumps to the patched version and retires the exception in the same change, because neither half is valid alone:

It also fixes a defect in the gate's own tests: they bound their fixtures to the shipped react-router entry, so retiring that entry broke five tests at once. The gate failed because the vulnerability it guards had been fixed, which is the wrong incentive — it makes keeping the exception the path of least resistance.

Advisory data (GET /advisories/GHSA-qwww-vcr4-c8h2):

severity: high
react-router  >= 7.12.0, < 7.18.2  first_patched = 7.18.2
react-router  >= 8.0.0,  < 8.3.0   first_patched = 8.3.0

The previous reason text predated the 7.x backport and described 8.3.0 as the only patched release, which is no longer accurate. No React 19 migration is required.

Linked issue

Related to #261, #265 — unblocks both.

What changed

Tooling / dependencies

  • apps/frontend/package.json, package-lock.jsonreact-router-dom / react-router 7.18.1 → 7.18.2 (patch bump, taken from chore(deps): bump react-router and react-router-dom in /apps/frontend #261).
  • scripts/dependency-audit-policy.json — removed the now-stale GHSA-qwww-vcr4-c8h2 acknowledgement. acknowledged is now empty, which is the healthy steady state.
  • scripts/dependency-audit.test.mjs — behavioural tests rebound to a synthetic entry; shipped-policy expectations rewritten to hold for any exception set, including none.

No application code, contracts, or schemas changed.

Acceptance criteria completed

  • High-severity runtime advisory GHSA-qwww-vcr4-c8h2 resolved by upgrade, not by exception.
  • Stale acknowledgement removed; npm audit reports 0 vulnerabilities.
  • Gate still fails for every condition it failed for before (expiry, package identity drift, version drift, package removal, reachability).
  • Test suite no longer breaks when an exception is retired.

Testing performed

All five Frontend CI steps, run locally in order after a clean npm ci:

$ npm --prefix apps/frontend ci
found 0 vulnerabilities

$ node --test scripts/dependency-audit.test.mjs
ℹ tests 9   ℹ pass 9   ℹ fail 0

$ node scripts/dependency-audit.mjs
No blocking findings (0 accepted).

$ npm --prefix apps/frontend run lint
(clean)

$ npm --prefix apps/frontend run test
Test Files  39 passed (39)
Tests  220 passed (220)

$ npm --prefix apps/frontend run build
✓ built in 710ms

Negative check — the gate still blocks when it should. Retiring the exception without the bump (react-router 7.18.1 present) correctly fails:

Blocking:
  high  runtime  GHSA-qwww-vcr4-c8h2 React Router: RSC Mode CSRF Bypass ...
1 blocking finding(s).

Reachability is now asserted directly: no unstable_, createStaticHandler, createStaticRouter, StaticRouterProvider, deserializeErrors, react-router/server, or @react-router/{node,express,serve} usage anywhere in apps/frontend/src. PARTHA remains a client-only Vite SPA, so the RSC surface the advisory covers is not mounted.

Screenshots

Not applicable — no UI change.

Security and data considerations

Resolves a high-severity runtime advisory by upgrading to the patched release rather than continuing to accept it. No auth, owner-scoping, migration, logging, or secret-handling changes. No egress policy change. The audit gate keeps every one of its failure modes; only its test fixtures were decoupled from the live policy.

Dependencies and blocked work

None. Once this merges, #261 becomes redundant (its bump is included here) and #265 should be rebased — its remaining 7 bumps are unrelated to this advisory.

Scope changes or remaining work

None. The lucide-react v1 (#250) and React 19 (#249/#203) majors are separate breaking upgrades and are deliberately not touched here.

Contributor checklist

  • Follows the branch naming and commit conventions
  • Targets dev
  • Verified locally with the commands above
  • No secrets, .env, dist/, or generated artifacts committed
  • No applied migration edited
  • Docs/behaviour claims match real repository state

react-router 7.18.2 is the backported patch for GHSA-qwww-vcr4-c8h2
(affected >=7.12.0 <7.18.2, first patched 7.18.2), so the acceptance the
policy carried for 7.18.1 no longer has an advisory to accept. Bump to
7.18.2 and remove the acknowledgement in the same change: retiring it
alone would leave an unpatched high-severity runtime advisory, and
bumping alone trips the gate's stale-acknowledgement check.

The policy tests bound their fixtures to the shipped react-router entry,
so retiring it broke five tests at once - the gate failed precisely
because the vulnerability it guarded had been fixed. Rebind them to a
synthetic entry and assert the shipped policy structurally, so the suite
holds for any exception set including an empty one. The client-only
reachability property is now asserted directly rather than as a side
effect of one acknowledgement.
@parthrohit22
parthrohit22 merged commit a7fe010 into Second-Origin:dev Aug 8, 2026
9 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