build(deps-dev): pin @babel/core to ^7.29.6 (fix Dependabot security_update_not_possible) - #206
Draft
Sbussiso wants to merge 1 commit into
Draft
build(deps-dev): pin @babel/core to ^7.29.6 (fix Dependabot security_update_not_possible)#206Sbussiso wants to merge 1 commit into
Sbussiso wants to merge 1 commit into
Conversation
…ity_update_not_possible Dependabot security-update run #32779463077 (job 1539386011) failed with security_update_not_possible for @babel/core: the advisory affects <= 7.29.0 (earliest fixed 7.29.6), but Dependabot's only computed patch path would have downgraded eslint-plugin-react-hooks 7.1.1 -> 5.2.0, so it refused to open a PR and the workflow concluded 'failure'. @babel/core is pulled transitively (eslint-plugin-react-hooks 7.1.1 -> @babel/helper-module-transforms 7.28.6 -> @babel/core 7.29.0) and is dev-only (build/lint tooling, never shipped to users), so the production npm audit --omit=dev gate is unaffected (0 vulnerabilities verified). However leaving the override absent means the Dependabot alert stays open and every security-update retry re-fails the workflow. Fix: add an npm 'overrides' pin of @babel/core to ^7.29.6, the pattern this repo already uses for postcss and js-cookie (with matching overridesNotes entry). 7.29.6 satisfies both transitive edges (^7.24.4 and ^7.0.0) so no dependency is downgraded -- eslint-plugin- react-hooks resolves unchanged at 7.1.1. Verified in the sandbox: - @babel/core now resolves to 7.29.7 (>= 7.29.6, non-vulnerable) - eslint-plugin-react-hooks unchanged at 7.1.1 (no downgrade) - npm run build: PASS (built in 327ms) - npm test (vitest run): 85/85 PASS - npm audit --audit-level=high --omit=dev: 0 vulnerabilities - package-lock.json regenerated with npm install --package-lock-only Run: https://github.com/SourceBox-LLC/Sentinel-Command/actions/runs/32779463077
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.
Root cause
Dependabot security-update run #32779463077 (job 1539386011) concluded failure with
security_update_not_possiblefor@babel/core:@babel/coreArbitrary File Read via sourceMappingURL Comment — affects<= 7.29.0; earliest fixed version 7.29.6.@babel/coreis pulled transitively:eslint-plugin-react-hooks@7.1.1→@babel/helper-module-transforms@7.28.6→@babel/core@7.29.0, with a^7.24.4edge fromeslint-plugin-react-hooksitself.eslint-plugin-react-hooksfrom7.1.1→5.2.0. Refusing to open a downgrade-as-fix PR, it declaredsecurity_update_not_possibleand exited 1 → the workflow_run concludedfailure.This is not a build/test failure — the app is fine and deploys are unaffected (
@babel/coreis dev-only tooling, never shipped to users;npm audit --omit=devis clean). But the Dependabot alert stays open and every security-update retry re-fails the workflow until the advisory is closed.Fix
Add an npm
overridespin of@babel/coreto^7.29.6— the exact pattern this repo already uses forpostcssandjs-cookie(with a matchingoverridesNotesentry explaining the rationale and removal condition). This is Dependabot's own recommended resolution (#2: "Add an override/resolution to pin @babel/core to a non-vulnerable version compatible with your dependencies").7.29.6satisfies both transitive edges (^7.24.4and^7.0.0), so no dependency is downgraded —eslint-plugin-react-hooksresolves unchanged at7.1.1.Verification (sandbox, real tool output)
@babel/coreresolves to7.29.7(≥ 7.29.6, non-vulnerable)eslint-plugin-react-hooks7.1.1(no downgrade)npm run buildnpm test(vitest run)npm audit --audit-level=high --omit=dev(CI prod gate)package-lock.jsonnpm install --package-lock-only)The 2 remaining
npm audithigh-severity entries (brace-expansion,nanoid) are pre-existing and unrelated to this run.Files
frontend/package.json— added@babel/core: ^7.29.6tooverrides+overridesNotesfrontend/package-lock.json— regeneratedOnce merged, the next Dependabot security-update run for
@babel/corewill find the resolved version already non-vulnerable and close the alert automatically.