fix: discard_changes path traversal via statuses + dep upgrades#519
Merged
Conversation
…parser Prevents authenticated arbitrary file deletion: discard_changes now validates every effective target path (including client-supplied statuses keys) against traversal before any git or fs call. Also upgrades multer to 2.2.0 (GHSA-72gw-mp4g-v24j, GHSA-3p4h-7m6x-2hcm) and body-parser to 2.3.0 (GHSA-v422-hmwv-36x6) in both lockfiles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bumps brace-expansion 5.0.6→5.0.7 (GHSA-3jxr-9vmj-r5cp), undici 7.24.6→7.28.0 (multiple high CVEs), vite 8.0.5→8.1.5 (GHSA-fx2h-pf6j-xcff), and dompurify 3.4.0→3.4.12 (multiple moderate CVEs). Adds npm overrides for brace-expansion and updates existing undici override to ^7.28.0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
CI run #1276 failed at the Audit dependencies step —
Fix (7d44e4f): Updated |
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.
Summary
discard_changesvalidatedpathsbut not client-suppliedstatuseskeys — whenpathswas omitted,Object.keys(statuses)became the target list andstatus: "added"entries flowed tofs.unlink, allowing authenticated arbitrary file deletion outside the repo. Validation now covers every effective target path (bothpathsandstatuseskeys) before any git/fs call. Added regression tests.multer2.1.1 → 2.2.0 (GHSA-72gw-mp4g-v24j, GHSA-3p4h-7m6x-2hcm) in both lockfiles.body-parser2.2.2 → 2.3.0 (GHSA-v422-hmwv-36x6) in both lockfiles.npm audit --omit=devis now clean in root andserver/.Test plan
statuseskeysnpm run build(typecheck + build) passesnpm audit --omit=devreports 0 vulnerabilities in both packages🤖 Generated with Claude Code