Skip to content

fix(deps): clear the CLI production audit - #4588

Closed
Astro-Han wants to merge 1 commit into
apache:mainfrom
Astro-Han:fix/cli-audit-fast-uri-qs
Closed

fix(deps): clear the CLI production audit#4588
Astro-Han wants to merge 1 commit into
apache:mainfrom
Astro-Han:fix/cli-audit-fast-uri-qs

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Build CLI release candidate fails on main and on every open PR:

Error: CLI production dependency audit failed: {"info":0,"low":0,"moderate":1,"high":1,"critical":0,"total":2}

Two advisories landed on transitive production dependencies of the CLI — fast-uri (high) and qs (moderate). scripts/release-cli-package.mjs audits production dependencies before it packs, so the gate is doing its job; the lockfile has to move.

packages/cli/THIRD_PARTY_NOTICES.txt moves with it. The notice file records the exact resolved versions, and check:cli-third-party-notices — the next step in the same script — fails with fast-uri@3.1.5: missing from package-lock.json if only the lockfile changes. Regenerated with node scripts/generate-third-party-notices.mjs --target cli.

@xmldom/xmldom (dev) is in the diff because npm audit fix resolves the root lockfile as a whole.

Why the open Dependabot PRs do not cover this

Merging all three leaves the gate red.

Verification

  • npm audit --omit=dev — 2 vulnerabilities (1 high, 1 moderate) before, 0 after.
  • node scripts/generate-third-party-notices.mjs --target cli --check — OK.
  • npm ci clean.
  • npm run release:cli:pack -- --allow-dirty gets past both gates above and then stops on cargo deny, which is not installed on this machine. CI has it.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code diagnosed the failing gate, applied npm audit fix, regenerated the notice file and drafted this description; the scope and the decision to keep it separate from the e2e work in #4577 were the author's.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes
  • No — dependency versions only

`fast-uri` (high) and `qs` (moderate) advisories landed on transitive
production dependencies of the CLI, so `release:cli:pack` fails its audit gate
and every job that packages the CLI goes red — main included. The lockfile
moves to the patched versions, and `packages/cli/THIRD_PARTY_NOTICES.txt` moves
with it, because the notice file records the exact versions the audit just
changed and its own check fails otherwise.

The three open Dependabot PRs do not cover this: apache#4586 and apache#4587 bump the same
packages in `packages/eval/harbor/deepseek-harness-toolchain`, a different
lockfile, and apache#4585 is a dev dependency the production audit does not read.
`@xmldom/xmldom` comes along here because `npm audit fix` resolves the root
lockfile as a whole; if apache#4585 lands first this hunk is already what it wants.

Generated-by: Claude Code
@github-actions github-actions Bot added the effort/XS Under 10 readable lines label Sep 2, 2026
@Astro-Han

Copy link
Copy Markdown
Contributor Author

Superseded by #4578, which landed the same root-lockfile bumps on main.

@Astro-Han Astro-Han closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XS Under 10 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant