chore(deps): override minimatch + brace-expansion to clear ReDoS advisories#515
Conversation
…sories The lockfile resolves several copies of minimatch at 3.1.2 and brace-expansion at 1.1.12, which npm audit flags as ReDoS: minimatch GHSA-3ppc-4f35-3m26 / GHSA-7r86-cg39-jmmj / GHSA-23c5-xmqv-rm74 (high) brace-expansion GHSA-f886-m6hf-6m8v (moderate) Most copies satisfy a caret range, but serve-handler@6.1.6 (via md-to-pdf) hard-pins `minimatch: "3.1.2"` exactly, so it only moves with an override. This adds global overrides forcing minimatch -> ^3.1.5 (latest/terminal 3.x) and brace-expansion -> ^1.1.13. Both are same-major patch bumps with no API change: glob@7 uses require('minimatch').Minimatch / .GLOBSTAR / .makeRe / .match (all 3.x-native), and readdir-glob (pinned ^3.1.5, down from 5.x) uses only new Minimatch() + .match(), identical across 3.x and 5.x. Verified: with the overrides, all 9 minimatch copies resolve to 3.1.5; npm audit no longer reports the minimatch or brace-expansion advisories (43 -> 40 total); the project builds; and exceljs xlsx + csv round-trips pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a top-level ChangesDependency Version Pinning
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Adds npm
overridesforcingminimatch→^3.1.5andbrace-expansion→^1.1.13, clearing the ReDoS advisoriesnpm auditreports against the lockfile.Why
The lockfile resolves several copies of
minimatch@3.1.2andbrace-expansion@1.1.12:minimatch— GHSA-3ppc-4f35-3m26 / GHSA-7r86-cg39-jmmj / GHSA-23c5-xmqv-rm74 (high)brace-expansion— GHSA-f886-m6hf-6m8v (moderate)Most copies satisfy a caret range and could update on their own, but
serve-handler@6.1.6(viamd-to-pdf) hard-pinsminimatch: "3.1.2"exactly, so that copy only moves with an override.Safety
Both are same-major patch bumps — no API change:
glob@7usesrequire('minimatch').Minimatch/.GLOBSTAR/.makeRe/.match(all 3.x-native).readdir-glob(pinned^3.1.5, down from 5.x) uses onlynew Minimatch()+.match(), identical across 3.x and 5.x.Verification
With the overrides applied, all 9
minimatchcopies resolve to 3.1.5;npm auditno longer reports theminimatchorbrace-expansionadvisories (43 → 40 total); the project builds; and exceljs xlsx + csv round-trips pass.Summary by CodeRabbit