Repository navigation
chore(deps): patch minimatch and glob for two security advisories - #471
Merged
Merged
Conversation
No parent has a release with patched ranges yet, so this overrides the nested copies: glob ^14.0.2 under @node-minify/core (was ^10.5.0) and @opennextjs/cloudflare (was ^13.0.6), and minimatch ^11.0.1 under @typescript-eslint/typescript-estree (was ^10.2.2). ESLint's own minimatch 3.1.5 is outside the advisory range and stays. Fixes GHSA-g3hv-75wg-m249 and GHSA-3g3m-2fjr-6pw4.
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.
What and why
Clears Dependabot alerts #87 and #85.
minimatchbelow 11.0.1 (GHSA-g3hv-75wg-m249, denial of service via globparts amplification). We had 9.0.9 under@node-minify/core, and 10.2.6 underglob13 and under@typescript-eslint/typescript-estree.glob9.0.0 through 14.0.1 (GHSA-3g3m-2fjr-6pw4, AbortSignal cancellation bypass). We had 10.5.0 under@node-minify/coreand 13.0.6 from@opennextjs/cloudflare.No parent can move to a fixed range yet. The newest
@opennextjs/cloudflare(1.20.16) still asks forglob ^13.0.6.@opennextjs/aws4.1.15 still pulls@node-minify/core9, which pinsglob10.3.3.@typescript-eslint/typescript-estree8.72.1 still asks forminimatch ^10.2.2. So this uses three scoped overrides:glob ^14.0.2under@node-minify/core(the override from chore(deps): override glob under @node-minify/core to 10.5.0 #177, bumped from^10.5.0)glob ^14.0.2under@opennextjs/cloudflareminimatch ^11.0.1under@typescript-eslint/typescript-estreeBoth globs now resolve to 14.0.4 and every affected minimatch to 11.0.5. ESLint and its plugins keep
minimatch3.1.5. That version is outside the advisory range and has a different API, so a top level minimatch override would have broken lint.These are major jumps for the nested copies, so I read each call site against the glob 11 to 14 and minimatch 11 changelogs.
@node-minify/coreonly callsglobSync(pattern). OpenNext usesglobandglobSyncwithcwd,absolute,nodir,withFileTypes,windowsPathsNoEscapeand one relativeignore. typescript-estree callsminimatch(path, pattern, { dot: true }). None of that changed. The breaking changes are in APIs nobody here uses (makeRe,GlobWalker, thedebugoption,ignorepatterns that start with/), plus glob 11 dropping Node below 20, which ourenginesalready require.Both packages only run during the OpenNext build and lint, never in the deployed Worker, so nothing was exploitable in production.
Dependabot's own security update failed for two reasons. Looking for an upgrade path, its auditor walked back to
@opennextjs/cloudflare0.3.x through 0.6.x, and those releases depend onpkg.pr.newpreview builds that now return 404. Its fallbacknpm update minimatchcouldn't move 9.0.9 either, because our^10.5.0override held glob 10 in place. It then reported the top level 3.1.5 as the latest resolvable version and gave up.How I tested this
On Node 22 and npm 10, same as CI:
npm ci, thennpm ls minimatch globshows only glob 14.0.4 and minimatch 11.0.5 or 3.1.5.npm auditreports 0 vulnerabilities.npm run lint: 0 errors and 11 warnings, the same as develop.npm run test: 67 files, 2638 tests pass.npm run buildandnpx opennextjs-cloudflare buildboth pass. The manifest loader that OpenNext generates inhandler.mjslists the manifests for every route, so its glob 14 calls are finding files. The two esbuild warnings in the server bundle also show up in develop's CI.globSyncwithwithFileTypes,globSyncwithcwd,absoluteandignore, asyncglobwith a pattern array andnodir, andminimatch(path, pattern, { dot: true }). All returned what they should.npm 10 dropped the
libcfields from the 8 Linux binary entries in the lockfile again (same as #177), so I put them back. Apart from the glob and minimatch subtrees, the lockfile diff removes glob 10's CLI dependencies (jackspeak,foreground-child,@isaacs/cliuiand its copies ofstring-widthandwrap-ansi). It also markscross-spawn,whichand a few others as dev only, because ESLint is now the only thing that pulls them in. No direct dependency changed version.Notes for reviewers
The overrides can go once upstream catches up. Drop the two glob entries when OpenNext moves to glob 14 and off node-minify 9, and the typescript-estree entry when typescript-eslint moves to minimatch 11.