Repository navigation
fix(deps): override glob and minimatch to clear npm audit - #667
Conversation
npm audit on main fails with two moderate advisories: - GHSA-3g3m-2fjr-6pw4 (glob >=9.0.0 <=14.0.1), via jest's @jest/reporters, jest-config and jest-runtime - GHSA-g3hv-75wg-m249 (minimatch >=7.0.0 <11.0.1), via glob, eslint, @eslint/config-array and @typescript-eslint/typescript-estree No upstream release fixes either yet: jest 30.5.2 still depends on glob ^13.0.6 and eslint 10.14.0 / typescript-eslint 8.72.1 still depend on minimatch ^10. Add ranged overrides so only the vulnerable versions are lifted (glob -> ^14.0.2, minimatch -> ^11.0.1); the glob 7 / minimatch 3 pair under test-exclude is outside both ranges and stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@donpetry-bot please review |
|
@don-petry I'm on it — starting a fresh review now. Results will appear in a few minutes. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
dev-lead is withholding action on this item. It is labeled To re-enable automated pickup: remove the |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Superseded by automated re-review at
|
CI (Node 20, npm 10.8.2) rejected the lockfile in `npm ci` because
npm 10 mis-handles ranged override keys ("glob@>=9.0.0 <14.0.2"): once
the override lifts a copy out of the range it re-flags it as missing.
Parent-scoped overrides don't work either, since npm 11 applies an
`@jest/reporters` override to its whole subtree, which includes
test-exclude's glob 7, and npm 10 doesn't.
Replace them with plain top-level overrides:
- glob ^14.0.2 (GHSA-3g3m-2fjr-6pw4)
- minimatch ^11.0.1 (GHSA-g3hv-75wg-m249)
- test-exclude ^7.0.2, so babel-plugin-istanbul's test-exclude uses
the named-export glob/minimatch APIs instead of glob 7 / minimatch 3
The lockfile was regenerated with npm 10.8.2 from main's lockfile,
re-resolving only the glob, minimatch and test-exclude entries.
`npm ci`, `npm ls` and `npm audit` are clean under npm 10.8.2 and
npm 11.11.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
Fixed in 2a4d833. The @donpetry-bot please review |
|
@don-petry I'm on it — starting a fresh review now. Results will appear in a few minutes. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 2a4d833103aab9b93abdeaff414fbce4617e9c54
Review mode: triage-approved (single reviewer)
Summary
This PR changes only dev dependencies: package.json gains three plain top-level overrides (glob ^14.0.2, minimatch ^11.0.1, test-exclude ^7.0.2), and package-lock.json is regenerated to match. Together these clear GHSA-3g3m-2fjr-6pw4 (glob) and GHSA-g3hv-75wg-m249 (minimatch). The new commit (2a4d833) replaces the ranged override keys that npm 10.8.2 rejected in npm ci. That rejection was the root cause of the CI failures that blocked the previous review (52682ae). All required checks now pass on this head. I agree with the triage assessment: the change is low risk, dev-only, and has no runtime, workflow or secret impact.
Linked issue analysis
No closing issue is linked, which is appropriate: this is a CI-unblocking fix, and the PR description explains the motivation (dependency-audit / npm audit fails on main, and combsmith/.github#1470 makes the Audit gate required). The follow-up to remove the overrides once jest, eslint and typescript-eslint ship patched ranges is tracked in #668, which is referenced but not auto-closed. That answers the prior review's request for a tracking issue.
Findings
Prior-review findings (52682ae), status at 2a4d833:
- major (ci): fixed. build-and-test, coverage, SonarCloud, Node.js Tests and Playwright UI Tests now all pass and run for a normal length of time (about 13 s to 1.5 min, not the earlier 10–12 s install failures). This is consistent with the author's diagnosis that npm 10.8.2 rejected the ranged override keys.
npm cisucceeding in CI also confirms that the lockfile is internally consistent (for example glob 14'sminipass ^7.1.3and minimatch 11'sbrace-expansion ^5.0.12requirements are satisfied). Several now-orphaned glob 10 transitive packages are pruned (foreground-child, jackspeak, @isaacs/cliui, inflight, once, etc.). - minor (supply-chain): accepted. The new packages are
@isaacs/nonrecursive-glob-match@1.0.3,path-scurry@3.0.0andlru-cache@11.5.3. Each resolves from registry.npmjs.org with an sha512 integrity hash and is markeddev: true. The author reports thatnpm audit signaturesverifies all 453 packages. I cannot run that check myself, so that part remains unconfirmed by this review. - minor (compatibility): substantially fixed. jest, eslint and test-exclude are forced to glob 14 / minimatch 11. CI exercises these code paths: jest discovery and coverage via coverage and build-and-test, and lint via build-and-test. All of them pass. The author also reports unchanged test counts (1090), coverage totals and lint results (22 warnings across 28 files). I could not compare the job logs to confirm those counts, so the monitoring note in the PR body (watch for drops in test or linted-file counts) is the right safeguard.
- minor (Node 18): accepted. minimatch 11.0.4 and lru-cache 11.5.3 declare
engines: 20 || >=22. Node 18 is past end of life, and the author states that every workflow pins Node 20 and the repo declares noenginesfield. I could not read this repo's workflows to confirm that. - minor (description): fixed. Risk, Rollback and Monitoring sections are present (DESCRIPTION_MISSING: 0), and #668 tracks removing the overrides.
New in this commit:
- info (compatibility,
package.json:25): Thetest-exclude ^7.0.2override goes outside babel-plugin-istanbul's declared^6range, and test-exclude 7.0.2 itself declaresglob ^10.4.1/minimatch ^10.2.2but gets 14 / 11. It therefore depends on the named-export{ glob }/{ minimatch }APIs staying compatible. The PR body states this tradeoff explicitly, and the green coverage job exercises it end to end. This is acceptable as a temporary measure until upstream catches up (#668). - info (dependency-risk,
package.json:23-25): The safety checks flag three unpinned caret ranges. The lockfile pins the exact resolved versions (14.0.3, 11.0.4, 7.0.2) and CI installs withnpm ci, so the practical risk is low. - info (process):
STANDARDS_SYNC_PR: trueis a heuristic misfire. This is a dependency-manifest change, not a standards sync, and the flag did not affect how this PR was assessed. - info (security): No security regression. Only
package.jsonandpackage-lock.jsonchange, there are no git or tarball sources and no install scripts in the added entries, and no workflow, secret or runtime code is touched. gitleaks, CodeQL (actions, javascript-typescript, python), AgentShield, SonarCloud (quality gate passed, 0 new issues, 0 hotspots), dependency-audit npm audit and the Audit gate all pass. The MCPrun_secret_scanningtool was not available in this run, so that scan was skipped; gitleaks passed. - info (bot-feedback): Codex completed its review of 2a4d833 with no findings. CodeRabbit's check is still IN_PROGRESS on this head. Its last finished review (52682ae) produced no actionable comments, and it excludes
package-lock.json. I treat it as advisory and non-blocking.
CI status
All completed checks on 2a4d833 pass: build-and-test, Secret scan (gitleaks), autofix, coverage, Node.js Tests, Playwright UI Tests, SonarCloud / SonarCloud Code Analysis, CodeQL (actions, javascript-typescript, python), AgentShield, dependency-audit (Detect ecosystems, npm audit, Audit gate), and Graphite AI Reviews. Ecosystem audits that don't apply here (pnpm, cargo, pip, govulncheck), and the dependabot and dev-lead jobs, were skipped as expected. The only incomplete check is the advisory CodeRabbit bot, which is still in progress. There are no submitted reviews, unresolved threads or unanswered human questions. The merge state is BLOCKED only because a review is required.
Reviewed automatically by the PR-review agent (single-reviewer mode: opus 5.5 [opus 4.8, opus 4.7]). Reply if you need a human review.
Summary
dependency-audit / npm auditfails onmain(run 41727967767), so theAudit gatethat combsmith/.github#1470 makes required would block every merge here. This PR clears both root advisories with npmoverrides.>=9.0.0 <=14.0.1@jest/reporters,jest-config,jest-runtime(glob 10.5.0)"glob": "^14.0.2"→ 14.0.3>=7.0.0 <11.0.1eslint,@eslint/config-array,@typescript-eslint/typescript-estree"minimatch": "^11.0.1"→ 11.0.4babel-plugin-istanbul→test-exclude@6, which uses the glob 7 / minimatch 3 default-export APIs"test-exclude": "^7.0.2", which uses the named{ glob }/{ minimatch }exports that glob 14 / minimatch 11 provideWhy overrides: no parent has released a fix. The latest jest (30.5.2) still requires
glob ^13.0.6, and the latest eslint (10.14.0) and typescript-eslint (8.72.1) still requireminimatch ^10. Drop these overrides once upstream catches up.Why plain top-level overrides: CI runs npm 10.8.2, which rejected the first version's ranged keys (
"glob@>=9.0.0 <14.0.2") innpm ci. Parent-scoped overrides behave differently in npm 10 and npm 11, because npm 11 also applies them totest-exclude's glob. The lockfile was regenerated with npm 10.8.2 from main's lockfile, re-resolving only the glob, minimatch and test-exclude entries.Verification (local)
npm ci,npm ls glob minimatch test-excludeandnpm auditpass under both npm 10.8.2 and npm 11.11.0. Audit reports 0 vulnerabilities (17 moderate on main).jest --coveragepasses 22 suites and 1090 tests, andscripts/check-coverage.jspasses.eslint src: 0 errors and 22 warnings, the same as main's CI.tsc --noEmit,prettier --check .andcheck:piipass.Risk
Low. The change is dev-only: package.json
overridesplus the lockfile, with no runtime or workflow changes. The main risk is a behaviour change from forcing glob 14 / minimatch 11 on jest, eslint and test-exclude. Two checks cover it: eslint still lints all 28 trackedsrcfiles with the same 22 warnings, and coverage, which depends on test-exclude, still reports the same totals. The new packages (glob 14.0.3, minimatch 11.0.4, path-scurry 3.0.0, lru-cache 11.5.3,@isaacs/nonrecursive-glob-match1.0.3) are all published by isaacs, the glob/minimatch maintainer, andnpm audit signaturesverifies all 453 packages. minimatch 11 and lru-cache 11 require Node20 || >=22. Every workflow pins Node 20, and the repo declares noenginesfield.Rollback
Revert this PR. That restores the previous overrides and lockfile, and the npm audit advisories come back.
Monitoring
Watch for jest file discovery, coverage collection or eslint file matching changing on later PRs. A drop in the number of tests or linted files would be the signal. Track removing the overrides in #668.
Follow-up: #668. Related: combsmith/.github#1406, combsmith/.github#1470
🤖 Generated with Claude Code
Summary by CodeRabbit