build(deps): override @babel/core to ^7.29.7 (fixes Dependabot run #32779736153) - #209
Draft
Sbussiso wants to merge 1 commit into
Draft
build(deps): override @babel/core to ^7.29.7 (fixes Dependabot run #32779736153)#209Sbussiso wants to merge 1 commit into
Sbussiso wants to merge 1 commit into
Conversation
Closes the Dependabot security-update job failure (run 32779736153, workflow "npm_and_yarn in /frontend for @babel/core", status security_update_not_possible). Root cause: @babel/core 7.29.0 is vulnerable to GHSA-4x5r-pxfx-6jf8 (Arbitrary File Read via sourceMappingURL Comment, low / CVSS 3.2), pulled transitively via eslint-plugin-react-hooks@7.1.1 -> @babel/helper-module-transforms@7.28.6. Dependabot could not auto-fix because the only automated path it found would downgrade eslint-plugin-react-hooks 7.1.1 -> 5.2.0, which it refuses to do. Fix: add an npm `overrides` entry pinning @babel/core to ^7.29.7 (the latest patched 7.x). 7.29.7 satisfies eslint-plugin-react-hooks' ^7.24.4 and @babel/helper-module-transforms' ^7.0.0, so the override resolves the advisory with NO downgrade of any package. Matches the existing postcss/js-cookie override pattern and documents the rationale in overridesNotes. Verified: npm install clean, build green, vitest 85/85 green, lint unchanged (38 pre-existing problems, none new), npm audit no longer lists @babel/core (remaining brace-expansion/nanoid highs are pre-existing and unrelated). The vulnerability is not reachable in our build (Vite/babel transforms source we control; no attacker-supplied sourceMap) but the override lets Dependabot resolve cleanly and keeps the audit-level gate honest. Remove the override once eslint-plugin-react-hooks ships against a >=7.29.6 baseline or @babel/core 8 is adopted.
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 this fixes
Closes the failed Dependabot security-update run 32779736153 (workflow
"npm_and_yarn in /frontend for @babel/core", statussecurity_update_not_possible).Root cause
@babel/core@7.29.0is vulnerable to GHSA-4x5r-pxfx-6jf8 — Arbitrary File Read via sourceMappingURL Comment (low, CVSS 3.2). It's pulled transitively:Dependabot refused the only automated path it found because that path would downgrade
eslint-plugin-react-hooks7.1.1 → 5.2.0— which it's not allowed to do for a security-only update. Hencesecurity_update_not_possible.Fix
Add an npm
overridesentry pinning@babel/coreto^7.29.7(the latest patched 7.x):7.29.7satisfies both constraints (^7.24.4and^7.0.0), so the override resolves the advisory with no downgrade of any package. This matches the existingpostcss/js-cookieoverride pattern already in the repo, and the rationale is documented inoverridesNotesalongside the others.Verification
npm installnpm run buildnpm test(vitest)npm run lintpackage.jsonoverrides)npm audit@babel/coreno longer listed (7.29.0 → 7.29.7)eslint-plugin-react-hooksversion@babel/helper-module-transformsversionThe remaining audit highs (
brace-expansion@1.1.16,nanoid@3.3.16) are pre-existing (identical versions before and after this change) and unrelated to this run.Reachability note
The advisory is not reachable in our build: Vite/Babel transforms source we author/control; there is no attacker-supplied
sourceMappingURLinput path. The override's primary value here is letting Dependabot's security-update job resolve cleanly (instead of hard-failing) and keeping the--audit-levelgate honest.Cleanup
Remove the override once
eslint-plugin-react-hooksships against a>=7.29.6baseline or@babel/core8 is adopted.Automated CI triage by Hermes coder.