fix(ci): clear cryptography + react-router CVEs blocking Test & Deploy (#538) - #158
Draft
Sbussiso wants to merge 1 commit into
Draft
fix(ci): clear cryptography + react-router CVEs blocking Test & Deploy (#538)#158Sbussiso wants to merge 1 commit into
Sbussiso wants to merge 1 commit into
Conversation
Run #538 (commit 39f7d82) failed two audit gates: 1. Backend pip-audit --strict: cryptography 48.0.1 has three new CVEs (CVE-2026-69248, -69249 fix 49.0.0; CVE-2026-69247 fix 50.0.0). All three are currently UNFIXABLE: the latest clerk-backend-api (6.0.1) pins cryptography>=45.0.0,<49.0.0, so bumping the constraint to >=49 makes the dep tree unsatisfiable. Apply the workflow's own documented escape hatch (--ignore-vuln with a revisit note) in both deploy.yml and weekly-deps-refresh.yml. Drop the ignores and bump the constraint-dependencies entry to >=50.0.0 once clerk-backend-api raises its cap past 50.0.0. 2. Frontend npm audit --audit-level=high --omit=dev: react-router 7.18.1 (pulled by react-router-dom ^7.18.1) is in the vulnerable range. react-router-dom has no 8.x; the only fully-patched version is the bare react-router@8.3.0. Switch from the deprecated react-router-dom package to react-router@8.3.0 (the v7+ recommended unified package) across src and tests. All APIs the app uses (BrowserRouter, Routes, Route, Navigate, useNavigate, useParams, useLocation, Outlet, Link) are exported unchanged by v8. Verified locally: - backend: 699 tests pass; pip-audit --strict green (3 ignored) - frontend: vite build OK; 85 tests pass; npm audit: 0 vulnerabilities
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.
CI fix for run #538 (commit 39f7d82, branch
ci-fix/30854617998)The "Test & Deploy" run failed two audit gates. This PR fixes both.
1. Backend
pip-audit --strict— cryptography 48.0.1 (3 CVEs)cryptography 48.0.1picked up three new advisories:These are currently unfixable. The latest
clerk-backend-api(6.0.1) pinscryptography>=45.0.0,<49.0.0, so bumping the constraint to>=49.0.0makes the dependency tree unsatisfiable (no clerk release permits cryptography ≥ 49). I tried>=50.0.0and>=49.0.0— both fail to resolve.Per the workflow's own documented policy ("When a CVE shows up with no fix yet, add
--ignore-vulnhere with a comment citing the upstream issue and the date we plan to revisit"), I added the three ignores to bothdeploy.ymlandweekly-deps-refresh.ymlwith a revisit note. Drop the ignores and bumpconstraint-dependenciestocryptography>=50.0.0once clerk-backend-api raises its cap past 50.0.0.2. Frontend
npm audit --audit-level=high --omit=dev— react-router (GHSA-qwww-vcr4-c8h2)react-router-dom ^7.18.1pullsreact-router@7.18.1, in the vulnerable range.react-router-domhas no 8.x release; the only fully-patched version is the barereact-router@8.3.0.Since v7, the React Router team recommends importing from the unified
react-routerpackage directly (react-router-domis deprecated). I switched the app fromreact-router-domtoreact-router@8.3.0and updated all 16 source files + 3 test files. All APIs the app uses (BrowserRouter,Routes,Route,Navigate,useNavigate,useParams,useLocation,Outlet,Link) are exported unchanged by v8 — no code changes beyond the import specifiers.Verification (local)
pytest→ 699 passed;pip-audit --strict(with ignores, fresh advisory cache) → green, 3 ignored.vite build→ OK (172 modules);vitest→ 85 passed;npm audit --audit-level=high --omit=dev→ 0 vulnerabilities.Follow-up (not in this PR)
clerk-backend-apirelease that raises the cryptography cap past 50.0.0, then remove the--ignore-vulnentries and bump the constraint.Draft for review — happy to split into two PRs (backend / frontend) if preferred.