Skip to content

Commit 6c76208

Browse files
sunnywuclaude
andcommitted
UID2-6617: Fix lint breakage from minimatch v10 API incompatibility
Replace the global Yarn resolution (minimatch -> 10.2.2) with a scoped resolution that only upgrades nodemon's minimatch to 10.2.2. All other packages (eslint-plugin-import, eslint, jest and other devDeps) revert to their natural 3.1.2 or 5.1.6, restoring lint compatibility. eslint-plugin-import 2.x calls minimatch() as a default-export function (pre-v6 API). Yarn v1's flat node_modules cannot install two separate minimatch versions without a nested installation that the flat model doesn't support when a global resolution is also present. Result: - nodemon (production dep): minimatch 10.2.2 (CVE fixed via scoped resolution) - eslint/jest devDeps: minimatch 3.1.2 / 5.1.6 (suppressed in .trivyignore) Add .trivyignore to suppress CVE-2026-26996 for dev-only minimatch instances. Expiry 2027-02-20 to revisit when ESLint is upgraded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6adb183 commit 6c76208

File tree

3 files changed

+40
-8
lines changed

3 files changed

+40
-8
lines changed

.trivyignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CVE-2026-26996: minimatch ReDoS vulnerability
2+
# Tracked in: https://thetradedesk.atlassian.net/browse/UID2-6617
3+
#
4+
# Suppressed for minimatch 3.1.2 and 5.1.6 which are pulled in ONLY by
5+
# devDependencies (eslint, eslint-plugin-import, eslint-plugin-jsx-a11y,
6+
# eslint-plugin-react, jest/test-exclude, jake/filelist). These versions
7+
# are not reachable at runtime in the production application.
8+
#
9+
# The production dependency (nodemon) is pinned to minimatch ^10.2.1
10+
# via a Yarn selective resolution, which resolves to 10.2.2 (fixed).
11+
#
12+
# Yarn v1's flat node_modules model cannot install two different versions
13+
# of minimatch simultaneously without breaking eslint-plugin-import, which
14+
# calls minimatch() as a default-export function (pre-v6 API). Upgrading
15+
# eslint-plugin-import to a version supporting minimatch v10 requires
16+
# migrating to ESLint v9, which is a separate effort.
17+
#
18+
# Expires: 2027-02-20 — revisit when eslint-plugin-import or ESLint is upgraded.
19+
CVE-2026-26996 exp:2027-02-20

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@
9595
},
9696
"resolutions": {
9797
"jws": "4.0.1",
98-
"minimatch": "^10.2.1",
99-
"eslint-plugin-import/**/minimatch": "3.1.2",
98+
"nodemon/minimatch": "^10.2.1",
10099
"qs": "6.14.1"
101100
}
102101
}

yarn.lock

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,13 @@ brace-expansion@^1.1.7:
15411541
balanced-match "^1.0.0"
15421542
concat-map "0.0.1"
15431543

1544+
brace-expansion@^2.0.1:
1545+
version "2.0.2"
1546+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7"
1547+
integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==
1548+
dependencies:
1549+
balanced-match "^1.0.0"
1550+
15441551
brace-expansion@^5.0.2:
15451552
version "5.0.2"
15461553
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.2.tgz#b6c16d0791087af6c2bc463f52a8142046c06b6f"
@@ -4255,19 +4262,26 @@ mimic-fn@^2.1.0:
42554262
resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz"
42564263
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
42574264

4258-
minimatch@3.1.2:
4265+
minimatch@^10.2.1:
4266+
version "10.2.2"
4267+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.2.tgz#361603ee323cfb83496fea2ae17cc44ea4e1f99f"
4268+
integrity sha512-+G4CpNBxa5MprY+04MbgOw1v7So6n5JY166pFi9KfYwT78fxScCeSNQSNzp6dpPSW2rONOps6Ocam1wFhCgoVw==
4269+
dependencies:
4270+
brace-expansion "^5.0.2"
4271+
4272+
minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
42594273
version "3.1.2"
42604274
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
42614275
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
42624276
dependencies:
42634277
brace-expansion "^1.1.7"
42644278

4265-
minimatch@^10.2.1, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2, minimatch@^5.0.1:
4266-
version "10.2.2"
4267-
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.2.tgz#361603ee323cfb83496fea2ae17cc44ea4e1f99f"
4268-
integrity sha512-+G4CpNBxa5MprY+04MbgOw1v7So6n5JY166pFi9KfYwT78fxScCeSNQSNzp6dpPSW2rONOps6Ocam1wFhCgoVw==
4279+
minimatch@^5.0.1:
4280+
version "5.1.6"
4281+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
4282+
integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
42694283
dependencies:
4270-
brace-expansion "^5.0.2"
4284+
brace-expansion "^2.0.1"
42714285

42724286
minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
42734287
version "1.2.8"

0 commit comments

Comments
 (0)