feat(web): migrate to react-router 8.3.0 (fixes GHSA-qwww-vcr4-c8h2)#202
Merged
Conversation
Fixes GHSA-qwww-vcr4-c8h2 (RSC-mode CSRF bypass, high) which blocks the F146 npm vuln gate on every PR. v8 dropped the react-router-dom shim, so the migration is a dependency swap plus a mechanical import rename — the declarative-mode API (BrowserRouter/Routes/Route/hooks) is unchanged. Closes #199
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrates the SPA from
react-router-dom@^7.1.1(resolving vulnerablereact-router@7.18.1) toreact-router@8.3.0. v8 dropped thereact-router-domshim package, so the entire change is:package.json: swapreact-router-dom→react-router@8.3.0(peer req react ≥19.2.7; we're on 19.2.8)"react-router-dom"→"react-router"across 13 filesThe app uses declarative mode only (
BrowserRouter/Routes/Route/hooks) — that API surface is unchanged in v8, so no behavioral changes.Why
GHSA-qwww-vcr4-c8h2 (react-router RSC-mode CSRF bypass, high, published 2026-07-25, vulnerable 7.12.0–8.2.0, fixed 8.3.0) fails the F146 npm vuln gate on every PR's web job, including Dependabot PRs #192/#195/#196. No 7.x backport exists.
Supersedes #200 (temporary gate exception) — this is the real fix, no exception needed.
Verification
tsc --noEmit: cleanvite build: clean[npm] no advisories at or above "high" (0 excepted, 0 below threshold)— exit 0Closes #199