Repository navigation
fix(deps): clear npm audit advisories for minimatch and glob - #572
Conversation
npm audit on main fails on two root advisories, reached through @electron-forge/* (via @electron/packager and @electron/universal -> @electron/asar), @typescript-eslint/*, eslint-plugin-import-x and @stryker-mutator/core: - GHSA-g3hv-75wg-m249 minimatch >=7.0.0 <11.0.1 (fixed in 11.0.1) - GHSA-3g3m-2fjr-6pw4 glob >=9.0.0 <=14.0.1 (fixed in 14.0.2) No parent has released a version that takes the fixed majors, so add range-scoped overrides. They only replace the vulnerable 7.x-10.x minimatch and 9.x-13.x glob, and leave the minimatch 3 / glob 7 that eslint and @electron/asar 3 use alone. eslint-plugin-import-x imports makeRe from minimatch, which minimatch 11 removed, so ESLint failed to load the config. Its fix (un-ts/eslint-plugin-import-x#570) is unreleased, so switch to eslint-plugin-import 2.32, the plugin import-x forked from. The two rules the config uses (order, no-duplicates) keep the same options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@donpetry-bot please review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
dev-lead is withholding action on this item. It is labeled To re-enable automated pickup: remove the |
|
@don-petry I'm on it — starting a fresh review now. Results will appear in a few minutes. |
This comment has been minimized.
This comment has been minimized.
Superseded by automated re-review at
|
|
Response to the cycle 1/3 review at
@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: MEDIUM
Reviewed commit: 3647bdc3409094540b97b63cfba5c039a4543d63
Review mode: triage-approved (single reviewer)
Summary
This PR clears the two root npm audit advisories, GHSA-g3hv-75wg-m249 (minimatch) and GHSA-3g3m-2fjr-6pw4 (glob). It does this with range-scoped overrides (minimatch@>=7.0.0 <11.0.1 → ^11.0.1, glob@>=9.0.0 <14.0.2 → ^14.0.2). It also replaces eslint-plugin-import-x with eslint-plugin-import@^2.32.0, because import-x 4.x imports makeRe, which minimatch 11 removed. Every touched package is a dev or build-time dependency. dependencies and app code are unchanged.
The head commit is the same one reviewed in cycle 1 (3647bdc). This re-review was triggered by the author's description update and their reply to each finding. I rate the risk MEDIUM rather than the triage's LOW, because the PR swaps a dev dependency and forces major-version overrides. These are all dev-only and covered by green CI, so they do not block approval.
Cycle-1 findings:
- major: description missing Risk, Rollback and Monitoring sections. Resolved. The PR body now has
## Risk,## Rollbackand## Monitoringsections, and the safety checks reportDESCRIPTION_MISSING: 0. - major:
mutationstill running at the head. Resolved.mutationfinished with SUCCESS on3647bdc(completed 2026-11-04T21:43:41Z). - minor: no
import/resolversetting, soimport/ordermight group imports differently. The author answered this. They ran both plugins against reversed imports in all 100srcfiles plus a probe with builtin, external,@shared/*alias, relative andimport typeimports. Both plugins reported the same 303 errors with identical text. I could not run lint myself to check this, so it rests on the author's report. CIquality(lint included) is green on all three OSes. - minor: overrides need removing later; asar path not exercised in CI; minimatch 11 needs Node 20+; new
@isaacs/nonrecursive-glob-matchpackage. The author accepted these, and they are now documented under Risk and Monitoring, including when and how to remove the overrides. None of them blocks.
Linked issue analysis
No closing issue is linked. The PR mentions #568 (OpenSSF Scorecard "2 existing vulnerabilities") as probably covered, without a closing keyword. That is the right call, because it stays open until a Scorecard re-scan confirms. The description states the motivation fully: dependency-audit / npm audit fails on main and blocks combsmith/.github#1470. The change addresses it, and dependency-audit / npm audit and Audit gate both pass on this head. I could not read #568 or #1470 directly.
Findings
- info: The override keys are range-scoped, so minimatch 3 (ESLint core, eslint-plugin-import) and glob 7 (
@electron/asar3) keep their versions. The lockfile matches this. Every rewritten minimatch copy (@electron/packager,@electron/universal,@stryker-mutator/core,@typescript-eslint/typescript-estree) moves from 10.x to 11.0.4, and the glob copies move from 13.0.6 to 14.0.3. Entries have sha512 integrity hashes and registry.npmjs.org URLs. (package.json:88) - info: The
eslint.config.mjschange is only a rename (import-x/→import/). Theorderandno-duplicatesoptions are unchanged. (eslint.config.mjs:64) - info: The new transitive dependencies of eslint-plugin-import are at patched versions where it matters:
json5@1.0.2(CVE-2022-46175 fix) andsemver@6.3.2. Removingunrs-resolverdrops a package with an install script and its 19 optional native bindings, which reduces install-time attack surface. - info: The safety checks flag 4 unpinned ranges. These are caret ranges locked by the committed lockfile. The
postcss-nestedentry already existed and only gained a trailing comma. Not blocking. (package.json:66) - info: The
run_secret_scanningMCP tool is not available in this read-only environment, so it was not run. The CI gitleaks scan passed, and the diff has no credential-like content. - info: Review-thread resolution state is not in the pre-fed metadata. All bot summary comments are minimized as resolved, the only formal review is an APPROVED, and no human-reviewer questions are open.
CI status
All checks completed with SUCCESS or SKIPPED, none failed or pending. Results:
qualitypasses on ubuntu, macOS and Windows.mutation,e2e,Secret scan (gitleaks)andWorkflow regression guardspass.dependency-audit / npm auditanddependency-audit / Audit gatepass.- CodeQL (actions, javascript-typescript, python), SonarCloud (Quality Gate passed, 0 new issues, 0 hotspots), CodeRabbit (no actionable comments) and AgentShield pass.
Skipped jobs are the ecosystem audits that don't apply here (pnpm, cargo, govulncheck, pip-audit) and automation jobs held by the dev-lead:hands-off label.
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.
|
pr-review approved on PARTIAL advisory evidence: 2/5 required advisory bots reported before the gate's head-age-timeout fallback proceeded. Recorded for the miss-rate metric (#1596). |
Summary
dependency-audit / npm auditfails onmain(run 41744902323). This blocks rolling out combsmith/.github#1470, which makesdependency-audit / Audit gatea required check. All 24 findings come from two root advisories in dev dependencies only:>=7.0.0 <11.0.1@electron-forge/*→@electron/packager,@electron/universal→@electron/asar;@typescript-eslint/typescript-estree;eslint-plugin-import-x;@stryker-mutator/core>=9.0.0 <=14.0.1@electron-forge/*→@electron/asar4No parent has a release on the fixed majors yet:
@electron/asar4.3.1 still wantsglob ^13andminimatch ^10. The same holds for typescript-eslint 8.72.1, stryker 10.1.1 and import-x 4.17.1. No open Dependabot PR covers these.Probably also covers #568 (OpenSSF Scorecard: "2 existing vulnerabilities"). Unconfirmed until the next Scorecard scan, so this PR does not auto-close it.
Changes
overridesinpackage.json:"minimatch@>=7.0.0 <11.0.1": "^11.0.1"and"glob@>=9.0.0 <14.0.2": "^14.0.2". They replace only the vulnerable copies. ESLint core keeps minimatch 3, and@electron/asar3 keeps glob 7. Those versions are outside both advisories and would break on the new majors.eslint-plugin-import-x→eslint-plugin-import@^2.32.0. import-x 4.17.1 doesimport { makeRe } from 'minimatch', and minimatch 11 removedmakeRe, so ESLint failed to load the config. The upstream fix is fix: support minimatch v9/v10/v11 and drop makeRe un-ts/eslint-plugin-import-x#570, still unreleased.eslint-plugin-importis the plugin import-x forked from. It uses minimatch 3, which is not affected. The config only usesorderandno-duplicates, and their options are unchanged. Only theimport-x/prefix becomesimport/.Testing
Local, clean
npm ci --legacy-peer-deps:npm audit --audit-level=low: 0 vulnerabilities (was 24 moderate)npm run typecheck,npm run lint,npm run format:check: passnpm run test:coverage: 80 files, 819 tests passnpm run packageandnpm run make(darwin): passnpx stryker run --dryRunOnly: passes. In CI, the fullmutationjob (stryker, which uses minimatch 11) passes on this head.srcfile (100 files) the import statements were reversed, and a probe added mixed builtin, external,@shared/*alias, relative andimport typeimports. Both plugins report the same 303order/no-duplicateserrors on the same files and lines, with identical text. The current tree is clean under both.@electron/asar: the forge config doesn't enable asar, somakedoesn't run the overridden asar code. I smoke-tested@electron/asar4.3.1 with glob 14.0.3 and minimatch 11.0.4 directly:createPackageWithOptionswithunpack: '*.node'andunpackDirpacks and unpacks correctly.dependency-audit / Audit gate,mutationande2e.Risk
Low. Nothing shipped in the app changes: every touched package is a dev or build-time dependency, and
dependenciesis untouched. The residual risks:@isaacs/nonrecursive-glob-match(minimatch 11's matcher, same maintainer). It is pinned with an integrity hash in the lockfile.unrs-resolverand its native binding packages, which had an install script.Rollback
Revert this PR. That restores
package.json,package-lock.jsonandeslint.config.mjs, and no data or runtime state is involved. Reverting brings back thenpm auditfailure, so theAudit gatewould block merges again.Monitoring
dependency-audit / Audit gateandnpm auditonmainafter merge. A new advisory in the overridden ranges would show up there.quality,mutationande2eon later PRs. A minimatch 11 or glob 14 incompatibility in eslint, stryker or forge would fail those jobs.@electron/asar, typescript-eslint and stryker accept minimatch ≥11.0.1 / glob ≥14.0.2, Dependabot bumps plusnpm ls minimatch globwill show the overrides are no longer needed. Delete them then. Switching back to import-x after fix: support minimatch v9/v10/v11 and drop makeRe un-ts/eslint-plugin-import-x#570 ships is optional.🤖 Generated with Claude Code