chore(security): force vite >=7.1.12 to clear path-traversal alert#460
Merged
Conversation
vitepress 1.6.4 declares `vite ^5.4.14`, and the only patched lines for GHSA-4w7w-66w2-5vf9 (vite path traversal in optimized deps `.map` handling) are >=6.3.7 / >=7.1.12 — Dependabot correctly reports "no patched version available" inside the declared range. Override resolves vitepress's vite to 7.3.2 (and leaves vitest's 8.0.8 in place). vitepress's runtime API is compatible despite the declared peer range — full build (87s) and 33 tests pass cleanly. `npm audit` now reports 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.
Summary
Closes Dependabot alert #16 (vite path traversal in optimized deps
.maphandling, GHSA-4w7w-66w2-5vf9) — the one alert that survived #459.Why
Dependabot couldn't auto-fix vite because vitepress 1.6.4 declares
vite ^5.4.14, and the patched range starts at 6.3.7 / 7.1.12 — nothing in the^5line is patched. Dependabot reportedsecurity_update_not_possible(see failed run #24641751012).This PR forces vite via
overrides, bypassing vitepress's declared peer range. Vitepress 1.6.4's runtime API turns out to be compatible with vite 7.x — the full build runs cleanly.Changes
overrides.vite: ">=7.1.12"inpackage.jsonvitepress→vite@7.3.2,vitest→vite@8.0.8, both patchedTest plan
npm install— 0 vulnerabilities reported bynpm auditnpm test— 33 tests passnpm run build— 87s, clean