Commit b1848ca
authored
fix: resolve high-severity npm audit vulnerabilities (brace-expansion DoS) (#755)
Root cause: GHSA-mh99-v99m-4gvg (CVE-2026-14257) — brace-expansion DoS via
unbounded expansion. The advisory affects every version < 5.0.8 (single
range `>=0, <5.0.8`), and 5.0.8+ is API-incompatible with the minimatch@3/@9
used by eslint@9 and jest. This left 31 transitive high vulns across the
jest/eslint/@typescript-eslint trees, and blocked every dependabot PR's
`npm audit --audit-level=high` CI step (main itself is affected).
The only patched brace-expansion (5.x) requires minimatch@10, which in turn
requires eslint@10 (eslint@9's @eslint/config-array pins minimatch@3).
@typescript-eslint@8.65.0 already declares `eslint: ^10.0.0` support.
Changes:
- eslint ^9 -> ^10, @eslint/js ^9 -> ^10 (natively use minimatch@10 +
brace-expansion@5, clearing the eslint tree).
- Drop the FlatCompat/@eslint/eslintrc layer; rewrite eslint.config.js as a
pure flat config (eslint@10's @eslint/eslintrc would otherwise still pull
vulnerable minimatch@3).
- Remove unused eslint-plugin-github (never referenced by the config); it
pulled old minimatch@3/@9 and a stale bundled typescript-eslint@8.16.0 and
was itself flagged by the audit.
- Add eslint-config-prettier@10 (previously only present transitively via
eslint-plugin-github) to preserve the prior `extends` behavior.
- Add overrides to clear the remaining jest-tree vulns:
brace-expansion ^5.0.8, glob ^11.0.1, test-exclude ^8.0.0
and force @typescript-eslint/utils ^8.65.0 so eslint-plugin-jest's older
transitive copy dedupes to the eslint@10-compatible release.
- Disable eslint@10's new `no-useless-assignment` rule to avoid churning the
bundled dist/ for an unrelated audit fix.
Result: `npm audit --audit-level=high` -> 0 vulnerabilities; build, lint,
format-check and tests (37/37) all pass; src/ and dist/ are untouched so
check-dist remains valid.1 parent 0fc2d3c commit b1848ca
3 files changed
Lines changed: 2282 additions & 7195 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
36 | 23 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 24 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
49 | 30 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
53 | 34 | | |
54 | | - | |
55 | | - | |
| 35 | + | |
| 36 | + | |
56 | 37 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
60 | 41 | | |
61 | | - | |
| 42 | + | |
62 | 43 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
69 | 47 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments