Skip to content

Move minimatch 9.x/10.x to 11.0.3 (GHSA-g3hv-75wg-m249) - #62

Merged
iLevyTate merged 1 commit into
mainfrom
claude/gallant-babbage-mlfl4c
Nov 1, 2026
Merged

iLevyTate merged 1 commit into
mainfrom
claude/gallant-babbage-mlfl4c

Conversation

@iLevyTate

Copy link
Copy Markdown
Owner

Summary

  • GHSA-g3hv-75wg-m249 (moderate): minimatch <11.0.1 can amplify globparts in firstPhasePreProcess() when optimizationLevel >= 2. The only fix is 11.0.1; there are no backports. That code exists in 9.x and 10.x, used here by eslint, @eslint/config-array, @typescript-eslint/typescript-estree, app-builder-lib, @electron/universal and test-exclude.
  • A range-keyed override, "minimatch@>=9.0.0 <11.0.1": "^11.0.3", moves those six copies to the project's minimatch 11.0.3, and they deduplicate to the root copy. With the range key alone, npm kept re-adding 10.2.6 under test-exclude and flagging it invalid, so test-exclude also gets a nested override. Its subtree holds only glob 14 and minimatch 11.
  • API check: 11 drops the top-level makeRe/AST exports and Minimatch#makeRe. None of the six consumers uses them. They call minimatch(), new Minimatch(), .match(path, partial), .negate and .set.
  • Left as is: the seven 3.x/5.x copies, used by eslint-plugin-import/react/jsx-a11y, @electron/asar and its glob 7, dir-compare and filelist. They have no firstPhasePreProcess or optimizationLevel, so the vulnerable code isn't there. Their callers also use the module as a function, which 11 no longer exports, and @electron/asar matches the asar unpack patterns. npm audit still lists them, because the advisory's single range covers every major.

Scope

  • Area(s): dev dependencies (ESLint, electron-builder, jest coverage)
  • Risk Level: medium. electron-builder's file matching runs on the new minimatch, so the checks below compare the real outputs.
  • Breaking Changes: none

Type of Change

  • Bug fix
  • Enhancement
  • New feature
  • Refactor
  • Documentation update
  • Breaking change

Test Plan

Automated

  • npm run format:check
  • npm run lint
  • npm test
  • Additional tests added/updated when behavior changed

Before/after comparisons on the real tree:

  • electron-builder matching: for all six release legs, over about 57,000 files, its matchers (getMainFileMatchers and getNodeModuleFileMatcher with the committed configs) select identical files with minimatch 10.2.6 and 11.0.3. The only differences are the removed minimatch copies themselves.
  • ESLint: it lints the same 1,546 files with identical results (0 errors, 2 warnings) on main and on this branch.
  • Audit and lockfile: npm audit --omit=dev finds 0 vulnerabilities. A second npm install leaves the lockfile unchanged, npm ci --dry-run (with the repo's .npmrc) passes, and npm ls shows no invalid minimatch nodes.
  • Pending: the full npm run ci is running locally. I'll compare its coverage totals with main's before merging.

Manual QA

  • Manual checklist completed (see docs/TESTING.md)
  • Not applicable (explain below)

Manual QA notes:

  • Only dev and build tooling changes. The packaged-file comparison and the release workflows' app.asar check cover the electron-builder side.

Checklist

  • I scoped this PR to one logical change
  • I self-reviewed code and naming for clarity
  • I updated docs/config references where needed
  • I called out follow-up work or known limitations: the 3.x/5.x copies stay in npm audit until their parents move to minimatch 9+. The newer filelist 2.x and @electron/asar 4.x already have, but they sit behind jake and electron-builder's pinned @electron/asar 3.4.1.

Generated by Claude Code

minimatch <11.0.1 can amplify globparts in firstPhasePreProcess() when
optimizationLevel >= 2 (moderate DoS; first patched release 11.0.1). That
code exists in 9.x and 10.x, used here by eslint, @eslint/config-array,
@typescript-eslint/typescript-estree, app-builder-lib, @electron/universal
and test-exclude. A range-keyed override moves those six copies to the
project's minimatch 11.0.3. test-exclude also gets a nested override: npm
kept re-adding 10.2.6 under it with the range key alone.

11 drops the top-level makeRe and AST exports and Minimatch#makeRe; none of
the six consumers uses them (they call minimatch(), new Minimatch(),
.match(path, partial), .negate and .set). Checked against the real tree:
- electron-builder's matchers select identical files for all six release
  legs (about 57,000 files) with 10.2.6 and 11.0.3;
- ESLint lints the same 1,546 files with identical results.

The 3.x and 5.x copies (eslint-plugin-import/react/jsx-a11y, @electron/asar
and its glob 7, dir-compare, filelist) stay: they have no
firstPhasePreProcess or optimizationLevel, so the vulnerable code is not
there, and their callers use the module as a function, which 11 no longer
exports. npm audit still lists them because the advisory's single range
covers every major.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
@iLevyTate
iLevyTate merged commit b5dd8ee into main Nov 1, 2026
11 checks passed
iLevyTate pushed a commit that referenced this pull request Nov 1, 2026
- package.json / package-lock.json: 5.1.2.
- CHANGELOG: 5.1.2 section for the glob and minimatch tooling updates
  (#61, #62) and the retried macOS notarization (#60); compare links.
- SECURITY.md: applies to 5.1.2; example patch versions.
- BETA_TESTER_GUIDE / INSTALL_GUIDE: current version and download names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
@iLevyTate iLevyTate mentioned this pull request Nov 1, 2026
7 of 16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants