Skip to content

fix(deps): resolve 7 audit advisories in undici and brace-expansion - #79

Merged
raymondk merged 1 commit into
mainfrom
fix/audit-undici-brace-expansion
Aug 3, 2026
Merged

fix(deps): resolve 7 audit advisories in undici and brace-expansion#79
raymondk merged 1 commit into
mainfrom
fix/audit-undici-brace-expansion

Conversation

@marc0olo

@marc0olo marc0olo commented Aug 3, 2026

Copy link
Copy Markdown
Member

pnpm audit currently fails on every PR — 7 vulnerabilities (3 high, 2 moderate, 2 low). It last passed on 2026-04-13, and also failed on the unrelated dependabot/npm_and_yarn/esbuild-0.28.1 PR in June.

This PR is dependency-only and independent of any other work.

What was failing

Package Advisories Path Needs
undici 4 (1 high, 1 moderate, 2 low) . > @actions/core > @actions/http-client > undici >=6.27.0
brace-expansion 3 (2 high, 1 moderate) . > rimraf > glob > minimatch > brace-expansion >=5.0.6, >=5.0.7, >=5.0.8

Worth flagging: the repo already had a brace-expansion override, but pinned at ^5.0.5 — which predates all three of its advisories, so it had stopped doing anything. Raising it is part of the fix rather than a new addition.

Changes

  • Add undici: ^6.27.0 override → resolves 6.28.0.
  • Raise brace-expansion override from ^5.0.5 to 5.0.8.
  • Rebuild the four action bundles (create-pr, assemble-docs, submit-docs, extract-version), since each bundles @actions/core. The dist diff is the undici 6.24.16.28.0 swap and nothing else — the same 794-line change in all four files.

Why brace-expansion is pinned exactly

^5.0.8 resolves to 5.0.9, published 2026-07-30 — inside the 7-day window that minimumReleaseAge: 10080 in pnpm-workspace.yaml exists to enforce. Overrides appear to bypass that gate, so a caret range here would quietly pull in a version the policy is meant to exclude. The exact pin keeps the resolution deterministic and policy-compliant. Both chosen versions clear the window: brace-expansion 5.0.8 (2026-07-23) and undici 6.28.0 (2026-07-24).

If you'd rather express this differently — a caret range plus a minimumReleaseAgeExclude entry, or bumping @actions/core itself — happy to change it.

Verification

  • pnpm auditNo known vulnerabilities found, exit 0 (was exit 1 with 7 findings).
  • pnpm build succeeds for all four actions; dist regenerated and committed, so check_dist:required should pass.
  • prettier --check clean.

Suggested follow-up (not in this PR)

self-pnpm-audit.yaml only triggers on pull_request, never on pushes to main or on a schedule. That's why this went unnoticed for months and then surfaced as a red X on unrelated PRs. Adding a push trigger on main or a nightly schedule would make the gate meaningful. Happy to file that separately.

🤖 Generated with Claude Code

pnpm audit reported 7 vulnerabilities (3 high, 2 moderate, 2 low) across two
transitive dependencies:

- undici <6.27.0 via @actions/core > @actions/http-client, 4 advisories
- brace-expansion via rimraf > glob > minimatch, 3 advisories requiring
  >=5.0.6, >=5.0.7 and >=5.0.8 respectively

The existing brace-expansion override pinned ^5.0.5, which predates all three
of its advisories, so it no longer had any effect.

Adds an undici override and raises the brace-expansion override to 5.0.8.
pnpm audit now reports no known vulnerabilities.

brace-expansion is pinned to an exact 5.0.8 rather than ^5.0.8 on purpose:
overrides appear to bypass the workspace's minimumReleaseAge gate, and ^5.0.8
resolves to 5.0.9, which was published within the 7 day window the gate
exists to enforce. 5.0.8 and undici 6.28.0 are both comfortably outside it.

The four action bundles are rebuilt because each one bundles @actions/core, so
the dist diff is the undici 6.24.1 -> 6.28.0 swap and nothing else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@raymondk
raymondk merged commit 0ed3330 into main Aug 3, 2026
13 checks passed
@raymondk
raymondk deleted the fix/audit-undici-brace-expansion branch August 3, 2026 16:51
marc0olo added a commit that referenced this pull request Aug 3, 2026
The four JavaScript actions run from a committed dist/index.js, so every runtime
dependency is bundled into it. That makes the bundles large generated artifacts
sitting in the middle of every review: bumping undici rewrote about 800 lines
across all four in #79, and bumping esbuild, which is the bundler itself, would
rewrite about 800 more in #76.

Marks them as generated in .gitattributes so they collapse in pull request
diffs. Reviewers see the source changes, and check_dist:required continues to
guarantee that the collapsed output is exactly what that source compiles to.
They are deliberately not marked -diff as well, since check-dist compares the
output of git diff dist/ and needs it to stay textual.

Adds extract-version to the check_dist matrix. It is a node24 action with an
856K bundle that was not covered, so a stale bundle there went unverified, and
it is the action release workflows use to read the version being published. Its
committed bundle is currently in sync, so this adds coverage without requiring
a rebuild.

Documents both in CONTRIBUTING.md, including the part that is easy to miss: a
dependency fix without rebuilt bundles does not change what runs, because the
lockfile is not consulted when GitHub executes an action. Adds a matching
convention to the README, since this repo documents conventions for other
repositories too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
marc0olo added a commit that referenced this pull request Aug 4, 2026
A high severity advisory published today covers brace-expansion >=4.0.0 <5.0.9
and is only patched in 5.0.9. main pins 5.0.8, so main is affected and
audit:required now fails on every open pull request.

#79 pinned 5.0.8 deliberately, because 5.0.9 was four days old and inside the
seven day minimumReleaseAge window that pnpm-workspace.yaml enforces. That
reasoning no longer holds now that 5.0.9 is the only patched version: a live
high severity advisory outweighs a quarantine that 5.0.9 clears on 2026-08-06
regardless.

pnpm audit reports no known vulnerabilities again. No action bundles change,
since brace-expansion is reached through rimraf, a devDependency that is not
bundled into the actions.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
marc0olo added a commit that referenced this pull request Aug 4, 2026
The four JavaScript actions run from a committed dist/index.js, so every runtime
dependency is bundled into it. That makes the bundles large generated artifacts
sitting in the middle of every review: bumping undici rewrote about 800 lines
across all four in #79, and bumping esbuild, which is the bundler itself, would
rewrite about 800 more in #76.

Marks them as generated in .gitattributes so they collapse in pull request
diffs. Reviewers see the source changes, and check_dist:required continues to
guarantee that the collapsed output is exactly what that source compiles to.
They are deliberately not marked -diff as well, since check-dist compares the
output of git diff dist/ and needs it to stay textual.

Adds extract-version to the check_dist matrix. It is a node24 action with an
856K bundle that was not covered, so a stale bundle there went unverified, and
it is the action release workflows use to read the version being published. Its
committed bundle is currently in sync, so this adds coverage without requiring
a rebuild.

Documents both in CONTRIBUTING.md, including the part that is easy to miss: a
dependency fix without rebuilt bundles does not change what runs, because the
lockfile is not consulted when GitHub executes an action. Adds a matching
convention to the README, since this repo documents conventions for other
repositories too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
marc0olo added a commit that referenced this pull request Aug 4, 2026
The four JavaScript actions run from a committed dist/index.js, so every runtime
dependency is bundled into it. That puts large generated artifacts in the middle
of every review: #79 changed 28 lines of package.json and pnpm-lock.yaml plus
3,176 lines of rebuilt bundle, so 99% of that review was generated output.

Marks them as generated in .gitattributes so they collapse in pull request
diffs. Reviewers see the source changes, and check_dist:required continues to
guarantee that the collapsed output is exactly what that source compiles to,
which is what makes collapsing it safe rather than reckless.

Adds extract-version to the check_dist matrix. It is a node24 action with an
856K bundle that was not covered, so a stale bundle there went unverified, and
it is the action release workflows use to read the version being published. Its
committed bundle is currently in sync, so this adds coverage without requiring
a rebuild.

Documents both in CONTRIBUTING.md, including the part that is easy to miss: a
dependency fix without rebuilt bundles does not change what runs, because the
lockfile is not consulted when GitHub executes an action. Adds a matching
convention to the README, since this repo documents conventions for other
repositories too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants