Skip to content

chore: Remediate 3 Dependabot security alerts - #253

Merged
ernst-dev merged 1 commit into
mainfrom
dependabot-remediate/alert-gap-20260825
Aug 26, 2026
Merged

chore: Remediate 3 Dependabot security alerts#253
ernst-dev merged 1 commit into
mainfrom
dependabot-remediate/alert-gap-20260825

Conversation

@ernst-dev

Copy link
Copy Markdown
Member

Summary

Removes react-router-dom from devDependencies and replaces its usage in test-pages/src/index.tsx with a minimal hand-rolled pathname router. This closes all 3 open Dependabot security alerts. There are no auto-generated Dependabot PRs for these alerts; this is the sole gap PR.

Alerts addressed by this PR

All three alerts share the same root cause: react-router-dom@6.30.4 and its transitive react-router@6.30.4.

Direct alert links (verbatim from Dependabot alerts API):

Merging this PR clears all 3 gap alerts this PR covers.

Why not upgrade?

What changed

test-pages/src/index.tsx used BrowserRouter + Routes + Route + Link only to navigate between three dev-harness pages. Replaced with a ~30-line hand-rolled router using useState(window.location.pathname) + window.history.pushState + popstate listener. URL structure is unchanged; integration tests are unaffected.

Lockfile delta

  • Removed: react-router-dom@6.30.4, react-router@6.30.4, @remix-run/router@1.23.3
  • Added: nothing
  • Changed: nothing

NPMPM status

All 3 removed packages had dev: true. No non-dev dependency versions changed. NPMPM check scope is empty — reviewer gate will show GREEN.

Testing

  • npm run test:unit — 54 suites, 507 tests, all passed
  • tsc --noEmit on test-pages/tsconfig.json — 0 errors in the changed file
  • npm audit — react-router / react-router-dom gone from output

Remove react-router-dom (^6.30.4) from devDependencies to remediate
three open Dependabot security alerts:

- GHSA-wrjc-x8rr-h8h6 (CVE-2026-53669): react-router open redirect
- GHSA-jjmj-jmhj-qwj2 (CVE-2026-53668): react-router-dom open redirect/XSS
- GHSA-337j-9hxr-rhxg (CVE-2026-53666): react-router constructor injection

react-router-dom v7 (the first patched line) requires react >= 18, but
this package pins react ^16.14.0, so an upgrade is not viable.
The dependency is dropped instead, following the same approach taken in
cloudscape-design/build-tools#74.

test-pages/src/index.tsx used only BrowserRouter + Routes + Route + Link
for navigating between three dev-harness pages. This is replaced with a
~30-line hand-rolled router using window.location.pathname, useState,
and a popstate listener — no new dependencies. URL structure is
preserved: /focus-visible.page and /use-resize-observer-test continue
to resolve exactly as before, keeping integration tests green.

Lockfile delta: -3 entries (react-router-dom@6.30.4, react-router@6.30.4,
@remix-run/router@1.23.3). No entries added. No non-dev dependency
versions changed, so NPMPM check scope is empty.
@ernst-dev
ernst-dev requested a review from a team as a code owner August 25, 2026 11:36
@ernst-dev
ernst-dev requested review from taheramr and removed request for a team August 25, 2026 11:36
@ernst-dev ernst-dev added the dependencies Pull requests that update a dependency file label Aug 25, 2026
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.10%. Comparing base (cee6bf0) to head (d929b9a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #253   +/-   ##
=======================================
  Coverage   98.10%   98.10%           
=======================================
  Files          56       56           
  Lines        1793     1793           
  Branches      524      519    -5     
=======================================
  Hits         1759     1759           
- Misses         33       34    +1     
+ Partials        1        0    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ernst-dev
ernst-dev requested review from pan-kot and removed request for taheramr August 25, 2026 12:19
@ernst-dev
ernst-dev added this pull request to the merge queue Aug 26, 2026
Merged via the queue into main with commit 49244b6 Aug 26, 2026
79 of 80 checks passed
@ernst-dev
ernst-dev deleted the dependabot-remediate/alert-gap-20260825 branch August 26, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants