Skip to content

fix: update brace-expansion to patch GHSA-3jxr-9vmj-r5cp (exponential-time DoS) - #1599

Open
priyagupta108 with Copilot wants to merge 4 commits into
mainfrom
copilot/update-bundled-brace-expansion
Open

fix: update brace-expansion to patch GHSA-3jxr-9vmj-r5cp (exponential-time DoS)#1599
priyagupta108 with Copilot wants to merge 4 commits into
mainfrom
copilot/update-bundled-brace-expansion

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

brace-expansion versions bundled in dist/ and pinned in the lockfile were below the patched floors for GHSA-3jxr-9vmj-r5cp (exponential-time DoS via consecutive non-expanding {} groups).

Changes:

  • Ran npm audit fix to update brace-expansion across all dependency paths:

    Range Before After
    1.x (minimatch) 1.1.13 1.1.16
    2.x (glob) 2.1.1 2.1.2
    5.x (@actions/glob, eslint, et al.) 5.0.6 5.0.8

    The 5.x bump to 5.0.8 (vs. the requested floor of 5.0.7) also addresses GHSA-mh99-v99m-4gvg (OOM via unbounded expansion).

  • Rebuilt dist/setup/index.js and dist/cache-save/index.js so the committed bundles contain the patched code.

Related issue:
#1596

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

…d dist

- brace-expansion 1.1.13 → 1.1.16 (GHSA-3jxr-9vmj-r5cp patched floor: 1.1.16)
- brace-expansion 2.1.1 → 2.1.2 (GHSA-3jxr-9vmj-r5cp patched floor: 2.1.2)
- brace-expansion 5.0.6 → 5.0.8 (GHSA-3jxr-9vmj-r5cp patched floor: 5.0.7; also fixes GHSA-mh99-v99m-4gvg)
- Regenerated package-lock.json
- Rebuilt dist/setup/index.js and dist/cache-save/index.js with patched dependency

Closes #1596
Copilot AI changed the title [WIP] Update bundled brace-expansion for GHSA-3jxr-9vmj-r5cp fix: update brace-expansion to patch GHSA-3jxr-9vmj-r5cp (exponential-time DoS) Jul 28, 2026
Copilot AI requested a review from priyagupta108 July 28, 2026 09:54
…icense cache

## Basic validation CI fix
Add `overrides` in package.json to eliminate all brace-expansion 1.x and 2.x
from the dependency tree, resolving GHSA-mh99-v99m-4gvg for all packages:
- `"@actions/glob": "$@actions/glob"` - forces @actions/cache to use the
  root @actions/glob@0.7.0 (minimatch@10.x → brace-expansion@5.0.8) instead
  of its bundled @actions/glob@0.6.1 (minimatch@3.x → brace-expansion@1.x)
- `"glob": {"minimatch": "^10.2.5"}` - forces glob@10.x to use
  minimatch@10.x → brace-expansion@5.0.8 instead of minimatch@9.x → brace-expansion@2.x
- `"test-exclude": "^7.0.2"` - upgrades test-exclude to a version that
  natively uses minimatch@10.x (instead of @3.x), removing brace-expansion@1.x
  from the jest coverage instrumentation path

`npm audit --audit-level=high` now reports 0 vulnerabilities.

## Licensed CI fix
Update .licenses/npm/ cache to match the new dependency tree:
- Add: brace-expansion-5.0.8.dep.yml
- Add: minimatch-10.2.6.dep.yml
- Remove stale: brace-expansion-1.1.13.dep.yml (already done in prev commit)
- Remove stale: brace-expansion-5.0.6.dep.yml (already done in prev commit)
- Remove stale: minimatch-3.1.5.dep.yml
- Remove stale: @actions/glob-0.6.1.dep.yml
- Remove stale: concat-map.dep.yml
- Remove stale: balanced-match-1.0.2.dep.yml

Rebuild dist artifacts to include updated brace-expansion.
@priyagupta108
priyagupta108 marked this pull request as ready for review July 28, 2026 11:08
@priyagupta108
priyagupta108 requested a review from a team as a code owner July 28, 2026 11:08
Copilot AI review requested due to automatic review settings July 28, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to remediate GHSA-3jxr-9vmj-r5cp by updating brace-expansion versions used by the action (including the committed dist/ bundles) so the shipped JavaScript no longer contains vulnerable implementations.

Changes:

  • Added an npm overrides entry intended to force brace-expansion to a patched version.
  • Updated package-lock.json dependency resolution accordingly.
  • Updated tracked third-party license metadata under .licenses/ to match the new dependency set (and rebuilt dist/ artifacts per PR description).

Reviewed changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Introduces an npm override to pin brace-expansion (currently forces all paths to 5.0.8).
package-lock.json Updates the resolved dependency graph; currently results in only brace-expansion@5.0.8 being present.
dist/setup/index.js Rebuilt bundle; contains inlined balanced-match + brace-expansion module code.
dist/cache-save/index.js Rebuilt bundle; contains inlined balanced-match + brace-expansion module code.
.licenses/npm/concat-map.dep.yml Removes license metadata for concat-map (no longer in lock).
.licenses/npm/brace-expansion.dep.yml Updates license metadata version for brace-expansion to 5.0.8.
.licenses/npm/brace-expansion-1.1.13.dep.yml Removes license metadata for the prior brace-expansion@1.1.13.
.licenses/npm/balanced-match.dep.yml Adds license metadata for balanced-match@4.0.4.
.licenses/npm/balanced-match-1.0.2.dep.yml Removes license metadata for the prior balanced-match@1.0.2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update bundled brace-expansion for GHSA-3jxr-9vmj-r5cp

5 participants