Skip to content

chore(deps): override vulnerable minimatch 3.x to 3.1.5 (ReDoS fixes)#1715

Closed
cliffhall wants to merge 1 commit into
mainfrom
deps/security-minimatch
Closed

chore(deps): override vulnerable minimatch 3.x to 3.1.5 (ReDoS fixes)#1715
cliffhall wants to merge 1 commit into
mainfrom
deps/security-minimatch

Conversation

@cliffhall

Copy link
Copy Markdown
Member

Summary

Adds a version-targeted npm override in the root package.json so that only the vulnerable minimatch 3.x line is bumped, resolving the HIGH-severity ReDoS advisories.

"overrides": {
  "get-intrinsic": "1.3.0",
  "minimatch@<3.1.4": "3.1.5"
}

The minimatch@<3.1.4 selector scopes the override to the old 3.x line only. The healthy minimatch 9.x and 10.x instances elsewhere in the tree are left completely untouched (never forced down).

Verification

npm ls minimatch --all after the change:

  • 6x minimatch@3.1.5 (all former 3.1.2 consumers now deduped to 3.1.5)
  • 1x minimatch@9.0.9 — untouched
  • 1x minimatch@10.2.5 — untouched
  • No minimatch < 3.1.4 remains

The lockfile change is minimal — only the single hoisted node_modules/minimatch entry moves from 3.1.2 to 3.1.5. npm ci installs cleanly against the committed lockfile.

Checks

  • npx prettier --check . — pass
  • npm run check-version — pass
  • cd client && npm run lint — pass
  • cd client && npm test — pass (535 tests)
  • cd cli && npm test — pass (85 tests)
  • npm run build — pass
  • e2e (e2e_tests.yml) — skipped (requires Playwright browser download)

Resolves Dependabot alerts #69, #66, #61
Part of #1706

🤖 Generated with Claude Code

https://claude.ai/code/session_01HiccCEh9mwCfVzE8qYcop1

@cliffhall

Copy link
Copy Markdown
Member Author

@claude review — security dependency fix adding a targeted minimatch override (3.x → 3.1.5, part of #1706). Verify it resolves the ReDoS advisories, leaves 9.x/10.x untouched, and nothing is broken. Flag anything actionable.

@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Claude finished @cliffhall's task in 2m 33s —— View job


Review: minimatch 3.x → 3.1.5 security override

  • Read PR diff (package.json + lockfile)
  • Verify override selector scopes to 3.x only
  • Confirm 9.x / 10.x instances untouched
  • Verify 3.1.5 resolves the ReDoS advisories
  • Check nothing is broken

Verdict: LGTM. The override is correctly scoped, the advisories are fully resolved, and nothing in the tree is broken. Details below.


The selector is precise — not just "good enough"

I ran npm audit against a minimatch@3.1.2 lockfile to get the authoritative advisory ranges. There are three ReDoS advisories in play:

GHSA Description Vulnerable range
GHSA-3ppc-4f35-3m26 ReDoS via repeated wildcards w/ non-matching literal <3.1.3
GHSA-7r86-cg39-jmmj matchOne() combinatorial backtracking (non-adjacent GLOBSTARs) <3.1.3
GHSA-23c5-xmqv-rm74 Nested *() extglobs → catastrophic backtracking <3.1.4

The aggregate vulnerable range is <3.1.4, and npm's recommended fix is 3.1.5. So the selector minimatch@<3.1.43.1.5 matches the vulnerable range exactly: it bumps 3.1.2/3.1.3 (vulnerable) to 3.1.5, and correctly leaves 3.1.4+ alone since 3.1.4 already patches all three. No robustness gap here — good choice.

9.x / 10.x left untouched ✓

Confirmed directly in the lockfile:

  • @typescript-eslint/.../minimatch9.0.9 (unchanged)
  • rimraf/node_modules/minimatch10.2.5 (unchanged)
  • hoisted node_modules/minimatch3.1.2 → 3.1.5 (the only change in the diff)
  • serve-handler/node_modules/minimatch3.1.5 (already 3.1.5 on main, now consistent with the hoisted copy)

Version + integrity verified against the registry ✓

  • 3.1.3/3.1.4/3.1.5 are real backport releases published 2026-02-22 → 2026-02-25 specifically for the 3.x line; 3.1.5 is the latest 3.x.
  • Lockfile integrity sha512-VgjWUsnn…8g8hQ== matches npm view minimatch@3.1.5 dist.integrity exactly.

Nothing broken ✓

3.1.5 is a patch release over 3.1.2: same brace-expansion@^1.1.7 dependency, engines.node: "*", no public API changes. The lockfile diff is minimal (+3/-3) and serve-handler's dependency edge resolves cleanly to the bumped copy.

Minor / non-blocking

  • The three advisory GHSA IDs above are worth pasting into the PR description alongside the Dependabot alert numbers — makes the security scope self-documenting for future readers.
  • Since network wasn't available to run npm ci/build here, I relied on the registry + lockfile inspection rather than a fresh install; the author's reported npm ci + build/test runs cover that gap.

No actionable defects found.
deps/security-minimatch

@cliffhall cliffhall linked an issue Jul 17, 2026 that may be closed by this pull request
10 tasks
Resolves Dependabot alerts #69, #66, #61. Part of #1706.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HiccCEh9mwCfVzE8qYcop1
@cliffhall
cliffhall force-pushed the deps/security-minimatch branch from db2d302 to b71003a Compare July 18, 2026 00:05
cliffhall added a commit that referenced this pull request Jul 18, 2026
npm does not reliably apply these transitive overrides to an existing
lockfile (bare and targeted overrides via install/update leave residual
vulnerable copies). This regenerates the lockfile from scratch with
version-targeted overrides so every copy of the affected packages
resolves to a patched version.

Resolves Dependabot alerts:
- esbuild #121 (-> 0.28.1)
- minimatch #69, #66, #61 (3.x -> 3.1.5)
- @babel/core #132 (-> 7.29.7; completes the partial fix from #1712)
Also pins js-yaml overrides (3.15.0 / 4.2.0) to prevent regression.

Supersedes #1713, #1714, #1715. Part of #1706.

Verified: 0 vulnerable copies across all advisories; build + client (535)
+ cli tests pass; lockfile internally consistent.


Claude-Session: https://claude.ai/code/session_01HiccCEh9mwCfVzE8qYcop1

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cliffhall

Copy link
Copy Markdown
Member Author

Superseded by #1718, which regenerates the lockfile with version-targeted overrides so every transitive copy is patched (npm wouldn't apply these overrides to the existing lockfile minimally, leaving residual vulnerable copies). js-yaml (#1713) was already resolved on main. See #1718 for the verified ALL-CLEAN result. Part of #1706.

@cliffhall cliffhall closed this Jul 18, 2026
@cliffhall
cliffhall deleted the deps/security-minimatch branch July 18, 2026 00:41
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.

Tracking: resolve open Dependabot and code scanning security alerts

1 participant