Repository navigation
chore(deps-dev): override glob and minimatch to clear GHSA-g3hv-75wg-m249 - #84
Merged
Merged
Conversation
…m249 minimatch < 11.0.1 has a pattern-amplification DoS, with no fix on the 9.x or 10.x lines. It reaches only the dev tree, through @opencode/plugin's own dependencies. Override minimatch to ^11.0.2 together with glob ^14.0.3: glob 13 and earlier use minimatch APIs that 11 removed, and glob 14 is the release built on minimatch 11. Every other consumer uses only APIs 11 keeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012aZHZ5fBse1HTCBF5yGdCw
|
✅ Auto-review verdict: pass — Dev-only dependency override for glob and minimatch plus an AGENTS.md note; no runtime or source changes. Reviewed commit No issues found. I read the diff and checked the lockfile.
Open questions (not run, so not counted toward the verdict):
Verdict: pass |
chrischall
enabled auto-merge (squash)
November 3, 2026 15:49
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.
Fixes Dependabot alert #8:
minimatch< 11.0.1, pattern-amplification DoS (GHSA-g3hv-75wg-m249, medium).Why an override, and why two packages
minimatchcomes in only through@opencode/plugin's own dependencies (@opencode/util,@npmcli/arborist,@tufjs/models,rimraf→glob…). It's dev-only: we import@opencode/pluginfor types and for the schema test, and none of this ships to users.^9or^10, so npm can't get there withoutoverrides.makeRe(),Minimatch#regexp,matchOne()andAST, andsetentries are no longerRegExps. A scan of the installed tree foundglob10 and 13 relying on exactly those (.makeRe,.matchOne,.regexp,instanceof RegExp), so overriding minimatch alone would leave glob broken.^11.0.2). Itsglob()/globSync()API is unchanged, and every glob consumer here (@opencode/util,@npmcli/map-workspaces,@npmcli/package-json,cacache,rimraf) calls only those. The direct minimatch users call onlyminimatch(),minimatch.match()andnew Minimatch(), which 11 keeps.So:
"overrides": { "glob": "^14.0.3", "minimatch": "^11.0.2" }. The tree now has one copy of each (glob 14.0.3, minimatch 11.0.4).AGENTS.md records the override and when to drop it: once
@opencode/pluginresolves minimatch ≥ 11.0.1 itself. The two entries have to go together.Verification
npm audit: 0 vulnerabilities.npm test(typecheck + vitest): 355/355.npm run buildpasses;plugin.d.mtsis 0.12 kB.glob()andglobSync({ ignore })return the same file counts asls;Glob.scanandGlob.match(@opencode/util) give correct results, includingdot: true;minimatch(),minimatch.match()andnew Minimatch().match()behave correctly;@npmcli/map-workspacesresolves.chore(deps-dev): a dev-only change, so no release.🤖 Generated with Claude Code
https://claude.ai/code/session_012aZHZ5fBse1HTCBF5yGdCw