Skip to content

fix(deps): clear audit advisories and accept unpatched picomatch ReDoS - #3744

Merged
bokelley merged 1 commit into
mainfrom
fix/npm-audit-main
Nov 18, 2026
Merged

bokelley merged 1 commit into
mainfrom
fix/npm-audit-main

Conversation

@bokelley

@bokelley bokelley commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Security Audit job, which the required Test & Build gate rolls up, fails on every PR to main and 16.x. The cause is GHSA-fc5q-39xc-vjpf (picomatch ReDoS), which GitHub reviewed on 2026-11-17. All 17 high findings trace back to that one advisory, and no picomatch release fixes it. This PR clears the advisories that have a patched release and accepts that one advisory by ID in the audit gate. Every other high or critical advisory still fails CI.

Supersedes #3697 (fast-xml-parser 5.11.2 → 5.12.0). This PR moves fast-xml-parser to 5.12.1.

Advisories addressed

Advisory Severity Package What this PR does
GHSA-fc5q-39xc-vjpf high picomatch ≤4.0.7 Cannot be fixed yet. 4.0.7 is the latest release and the upstream fix (micromatch/picomatch#194) is unmerged, so npm audit fix and overrides have nothing to pin. It is accepted by ID in scripts/security-audit.mjs with its justification: picomatch is reached only through build, lint and release tooling (tsup, typescript-eslint, @changesets/cli, ts-to-zod, json-schema-to-typescript, and the typescript-eslint parser @adcp/eslint-plugin uses), which match globs from repo or project config, not request input. The @adcp/sdk runtime does not depend on picomatch. This advisory accounts for all 17 highs in npm audit. The others (@changesets/*, @manypkg/*, tinyglobby, fdir, tsup, sucrase, @oclif/core, @typescript-eslint/typescript-estree, json-schema-to-typescript) are its dependents.
GHSA-jpvv-r467-5p4w moderate @hono/node-server <1.19.18 Lockfile 1.19.17 → 1.19.19 (patch release, within @modelcontextprotocol/node's ^1.19.9). Fixed.
GHSA-rmxm-3fg6-px4f moderate @hono/node-server ≥1.19.10 <2.1.3 Not fixed. The fix is only in @hono/node-server 2.x, which needs a bump of the pinned direct dependency @modelcontextprotocol/node 2.1.1 → 2.1.2 plus a major bump of @hono/node-server. Left for a separate change, since it is below the CI threshold.
GHSA-4m76-xfj5-7975, GHSA-h7mg-cq63-vhpq, GHSA-46wx-v44x-9hh2, GHSA-4h7h-rv7c-7m2v, GHSA-3gg2-335m-rxc6 moderate/low hono ≤4.13.15 Lockfile 4.13.13 → 4.13.19 (patch release, within ^4.11.4). Fixed.
GHSA-474x-hrwr-fgx4 low fast-xml-parser ≤5.11.2 Lockfile 5.11.2 → 5.12.1 (minor release, within @google-cloud/storage's and @azure/core-xml's ranges). It brings fast-xml-builder 1.3.2, strnum 2.5.1 and is-unsafe 2.0.3 as its own dependencies. Fixed.
GHSA-g3hv-75wg-m249 moderate minimatch 7–11.0.0 Not changed. The fix is minimatch 11, a major release, and the repo pins minimatch to ^10.2.1 through overrides. Below the CI threshold.
GHSA-w5hq-g745-h8pq moderate uuid <11.1.1 (via @google-cloud/storage 7) Not changed. The fix needs @google-cloud/storage 9, a major release. Below the CI threshold.

Why no npm audit fix

I ran npm audit fix without --force and discarded the result. It cleared none of the highs, it downgraded sucrase (3.35.1 → 3.35.0) and gaxios (6.7.1 → 6.3.0), it moved ejs from 3 to 6, and the sucrase downgrade added glob 10.5.0 with a new advisory. This PR uses npm update hono @hono/node-server fast-xml-parser instead. The lockfile diff is those three packages and the three dependencies fast-xml-parser 5.12 needs. Nothing else changes.

CI change

.github/workflows/ci.yml's Security Audit step now runs node scripts/security-audit.mjs instead of npm audit --audit-level=high. The threshold is unchanged: the script parses npm audit --json and fails on every high or critical advisory whose GHSA ID is not in ACCEPTED_ADVISORIES. It emits a ::warning for each accepted advisory it sees, so the exception stays visible on every run, and a stale-entry warning once an accepted advisory stops appearing. The full npm audit report is still printed first.

Verification

  • node scripts/security-audit.mjs: passes (36 total, 17 high, all GHSA-fc5q-39xc-vjpf). With the accepted ID removed, it fails and names picomatch.
  • Local (Node 24, npm 11): npm ci, format:check, lint, lint:boundaries, lint:workflows, typecheck, build:lib, typecheck:reporting-storage pass. test:node:fast and the eslint-plugin tests pass (one first-pass failure was 56 files hitting a dist rebuilt mid-run; rerun against the finished build: 1065/1065). Full CI, including every Unit Tests lane, is green.

🤖 Generated with Claude Code

The Security Audit job fails on every PR since GitHub reviewed
GHSA-fc5q-39xc-vjpf (picomatch <=4.0.7, high) on 2026-11-17. No picomatch
release fixes it (4.0.7 is the latest; micromatch/picomatch#194 is open),
so neither npm audit fix nor an overrides pin can clear it. Every other
high finding (changesets, tinyglobby, fdir, tsup, typescript-eslint,
ts-to-zod, json-schema-to-typescript, sucrase, @oclif/core) is a
dependent of that one advisory.

- Lockfile: hono 4.13.13 -> 4.13.19, @hono/node-server 1.19.17 -> 1.19.19,
  fast-xml-parser 5.11.2 -> 5.12.1 (with fast-xml-builder 1.3.2,
  strnum 2.5.1, is-unsafe 2.0.3). Supersedes dependabot #3697.
- CI: the audit step runs scripts/security-audit.mjs, which fails on any
  high or critical advisory not listed in its accepted set. The set holds
  only GHSA-fc5q-39xc-vjpf, with its justification, and warns when an
  entry goes stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@aao-secretariat aao-secretariat Bot 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.

Ladon verdict: Approve

Approve — security-audit hardening PR with no blocking or medium findings.

Scope: new scripts/security-audit.mjs (91 lines), a Security Audit step in ci.yml, lockfile dependency bumps (hono, @hono/node-server, fast-xml-parser), and a patch changeset. The audit script is fail-closed on every error path (parse failure, report.error, non-GHSA via.source fallback all exit 1), covers the tree via advisory objects, preserves the high/critical threshold, and emits visible accepted/stale warnings. The CI job's timeout-minutes: 5 bounds the spawnSync npm-audit call. The changeset type (patch) matches the lockfile-only, no-behavior-change surface.

Gate checks: no no-auto-approve team match; gated_paths: false (so the REVIEW_REQUIRED status does not trigger row 2); high_risk: false; no prior decision. No critical/high/medium findings. Rows 1–8 do not fire → row 9 approve.

@bokelley
bokelley merged commit e2b1233 into main Nov 18, 2026
45 checks passed
@bokelley
bokelley deleted the fix/npm-audit-main branch November 18, 2026 11:18
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.

1 participant