Commit 8144e75
authored
Bump brace-expansion to fix GHSA-f886-m6hf-6m8v in /.github/actions/upload-artifact-s3 (#8038)
## Summary
Patches the regex-DoS in `brace-expansion`
([GHSA-f886-m6hf-6m8v](GHSA-f886-m6hf-6m8v)
/ CVE-2026-33750) inside `.github/actions/upload-artifact-s3` by
upgrading the transitive `brace-expansion` dependency:
- `1.1.11` → `1.1.14`
- `2.0.1` → `2.1.0`
`brace-expansion` reaches this action's runtime through `@actions/glob`
→ `minimatch` → `brace-expansion` and is inlined into the action's
bundled entrypoint by `@vercel/ncc`.
## Changes
1. **`package-lock.json`** — pins both transitive instances of
`brace-expansion` to the patched releases. No `package.json` edits;
nothing in this action's tree depends on `brace-expansion` directly.
2. **`dist/upload/index.js`** — regenerated with `npm run release`
(`@vercel/ncc`). The bundled `brace-expansion` source now contains the
upstream patches:
- `expand()` accepts a `max` option and stops emitting expansions once
that bound is reached.
- The fast-path post-brace probe regex changes from `/,.*\}/` to
`/,(?!,).*\}/`, eliminating quadratic backtracking on dense-comma
inputs.
- Numeric brace step is clamped via `Math.max(Math.abs(step), 1)`, so
`{N..M..0}` no longer infinite-loops.
3. **`__tests__/brace-expansion.test.ts`** — two regression tests
against `minimatch.braceExpand` covering the two patched code paths
(zero-step `{1..3..0}` and dense-comma malformed input). The tests run
against the brace-expansion 2.x copy that ships with the action's direct
`minimatch` dep; the 1.x copy bundled into `dist/upload/index.js`
carries the same upstream patches and is guarded against lockfile/dist
drift by the existing `check-dist` CI job.
Closes T261666678.1 parent 157a448 commit 8144e75
3 files changed
Lines changed: 132 additions & 84 deletions
File tree
- .github/actions/upload-artifact-s3
- __tests__
- dist/upload
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 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 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments