Repository navigation
fix(deps): override vulnerable minimatch in the packaging toolchain - #86
Conversation
Clears the last moderate audit finding (GHSA-g3hv-75wg-m249), which blocked the release workflow's `npm audit --audit-level=moderate`. electron-builder's app-builder-lib and @electron/universal pin minimatch ^10 / ^9, which the fix never reached; even the latest electron-builder still does. The override is keyed on the vulnerable range only (`minimatch@>=7.0.0 <11.0.1`), so the 3.x and 5.x copies other packages use keep their own API. A parent-scoped override was tried first and forced 11.x onto glob@7 as well. Checked with minimatch 11 in place: `npm audit` reports 0 vulnerabilities; typecheck and tests pass; electron-builder packages the Windows app, and its asar holds exactly the `build.files` set (dist/main, dist/renderer, package.json, runtime deps) with no sources, tests or dev tools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
There was a problem hiding this comment.
Review Summary
This PR adds a targeted npm overrides entry to eliminate the last remaining audit finding (GHSA-g3hv-75wg-m249) in minimatch without downgrading electron-builder.
Assessment: The change is correct and safe to merge.
The override key "minimatch@>=7.0.0 <11.0.1": "^11.0.5" is precisely scoped:
- It correctly targets the vulnerable range (≥7.0.0 and <11.0.1) used by
app-builder-lib(^10.2.5) and@electron/universal(^9.0.3). - The lock file correctly retains separate scoped copies of minimatch 3.x and 5.x for
@electron/asar,dir-compare,glob@7, andfilelist— all of which were outside the override range and rely on the old API. This confirms the previously-attempted parent-scoped override issue (which would have forced 11.x ontoglob@7) was properly avoided. - The removal of the
@electron/universal/node_modules/minimatch(9.0.9) hoisted entry and its helpers is the expected lock file consequence of the override redirecting that resolution to the top-level 11.0.5. - The addition of
@isaacs/nonrecursive-glob-matchis a legitimate new transitive dependency introduced by minimatch 11.
No blocking issues found. The PR description, implementation, and lock file changes are all consistent with each other.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.



Summary
Clears the last audit finding, GHSA-g3hv-75wg-m249 in
minimatch, so the release workflow'snpm audit --audit-level=moderatepasses. Until now it blocked releases.app-builder-liband@electron/universaldepend onminimatch ^10.2.5and^9.0.3. The fix only exists in 11.0.1+, the latest electron-builder still pins^10, andnpm audit fix --forcewould downgrade electron-builder to 25.1.0.overridesentry,"minimatch@>=7.0.0 <11.0.1": "^11.0.5", keyed on the vulnerable range only. The 3.x and 5.x copies used byglob@7,dir-compareandfilelistare left alone. A parent-scoped override was tried first; it also forced 11.x ontoglob@7, which expects the old API, so it was dropped.Testing
npm auditreports 0 vulnerabilities, including at moderate level.npm run typecheckis clean, andnpm testpasses (1203 passed, 3 skipped).Minimatchclass andminimatchfunction the packaging tools use, with thedotandmatchBaseoptions. It gives the same results as 9.x on sample patterns.electron-builder --win dir --x64 -c.npmRebuild=falsepackaged successfully. Itsapp.asarcontains exactly thebuild.filesset (dist/main,dist/renderer,package.json) plus runtime dependencies, with no sources, tests or dev tools, andnode-ptyunpacked as before.Not tested locally: a full
npm run package:win(NSIS installer and portable exe). The rebuild of node-pty's native module fails on the build machine for reasons unrelated to this change: its Visual Studio Build Tools lack the Spectre-mitigated libraries. That step runs before any file matching, andmainfails there in the same way. The release workflow's runners will be the first full installer build.🤖 Generated with Claude Code