Skip to content

Fix high-severity npm audit failure (fast-uri)#538

Merged
srtfisher merged 1 commit into
developfrom
fix/npm-audit-high
Jun 15, 2026
Merged

Fix high-severity npm audit failure (fast-uri)#538
srtfisher merged 1 commit into
developfrom
fix/npm-audit-high

Conversation

@srtfisher

Copy link
Copy Markdown
Member

Problem

PR CI was red across all PHP matrix jobs — but the failure was in the Node Tests step, not PHP. The step runs:

npm audit --audit-level=high --omit=dev

which failed on a high-severity advisory in fast-uri@<=3.1.1:

fast-uri is pulled in transitively via ajv and the @wordpress/* packages, so it's present even with --omit=dev. Pre-existing on develop (reproduced on a clean checkout).

Fix

Add an npm overrides pinning fast-uri to ^3.1.2 — the patched 3.x release, which satisfies ajv's ^3.0.1 constraint, so nothing breaks:

"overrides": {
  "fast-uri": "^3.1.2"
}

Verification

  • npm audit --audit-level=high --omit=dev → exits 0 (32 moderate remain, no high/critical — tolerated by --audit-level=high, consistent with Fix high-severity npm audit failures #536).
  • npm run build compiles successfully; jest passes.
  • fast-uri resolves to 3.1.2 (npm ls fast-uri).

The remaining moderate advisories (@babel/runtime, uuid, showdown, postcss) have no non-breaking fix and don't fail the build; left as-is per the existing high-only policy.

🤖 Generated with Claude Code

The CI Node Tests step runs `npm audit --audit-level=high --omit=dev`,
which failed on fast-uri <=3.1.1 (path traversal GHSA-q3j6-qgpj-74h6 and
host confusion GHSA-v39h-62p7-jpjc), pulled in transitively via ajv and
the @wordpress/* packages.

Add an npm override pinning fast-uri to ^3.1.2 (the patched 3.x release,
compatible with ajv's ^3.0.1 constraint). Resolves the only high-severity
advisory; the remaining moderates are tolerated by --audit-level=high,
consistent with #536.

@kingkool68 kingkool68 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.

👍

@srtfisher srtfisher merged commit 4713960 into develop Jun 15, 2026
5 checks passed
@srtfisher srtfisher deleted the fix/npm-audit-high branch June 15, 2026 17:11
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