Fix high-severity npm audit failure (fast-uri)#538
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR CI was red across all PHP matrix jobs — but the failure was in the Node Tests step, not PHP. The step runs:
which failed on a high-severity advisory in
fast-uri@<=3.1.1:fast-uriis pulled in transitively viaajvand the@wordpress/*packages, so it's present even with--omit=dev. Pre-existing ondevelop(reproduced on a clean checkout).Fix
Add an npm
overridespinningfast-urito^3.1.2— the patched 3.x release, which satisfiesajv's^3.0.1constraint, so nothing breaks: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 buildcompiles successfully;jestpasses.fast-uriresolves to3.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