Skip to content

chore: INFRA-312 record audit-gate triage note (outage was transient, no fix needed) - #223

Merged
MP2EZ merged 2 commits into
developmentfrom
chore/INFRA-312-fix-npm-audit-ci-gate
Jul 26, 2026
Merged

chore: INFRA-312 record audit-gate triage note (outage was transient, no fix needed)#223
MP2EZ merged 2 commits into
developmentfrom
chore/INFRA-312-fix-npm-audit-ci-gate

Conversation

@MP2EZ

@MP2EZ MP2EZ commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Closes INFRA-312. No CI config change. No allowlist change. One appended comment.

The outage fixed itself

Security + compliance failed repo-wide for ~an hour with zero repo changes, blocking every PR including INFRA-306's otherwise-green #221. Then it recovered on its own: an untouched development worktree went from failing to Passed npm security audit with no edit of any kind β€” same node_modules, same lockfile, same commit.

So there was never anything wrong in this repo, and this PR deliberately changes no behaviour. What actually cost the time was an unactionable error message, so that is what gets fixed.

What happened

npm's legacy /-/npm/v1/security/audits/quick endpoint answered 400 Bad Request β€” Invalid package tree for this ~1,185-package tree while auditing a 20-package control tree fine; the newer security/advisories/bulk endpoint returned an undecompressed gzip body. audit-ci surfaced all of it as the bare, unactionable:

code undefined:
Exiting...

Eight hypotheses tested and disproved

Full ledger on the Notion item. The one never tried was "wait longer" β€” a gh run rerun --failed about 30 minutes in still failed, which made the outage look permanent. Hence the note records the retry window explicitly, plus the two most attractive red herrings:

The gate is healthy, not merely quiet

Verified rather than assumed β€” a gate that passes because it silently stopped auditing is exactly the failure class MAINT-307 and INFRA-306 both had to clean up. Dropping GHSA-mh99-v99m-4gvg from a scratch copy of the allowlist makes audit-ci exit 1 and print the advisory with full dependency paths:

audit-ci exit=1 (expect 1)
GHSA-mh99-v99m-4gvg|@eslint/eslintrc>minimatch>brace-expansion>
GHSA-mh99-v99m-4gvg|@jest/core>jest-runtime>glob>minimatch>brace-expansion>

With the real allowlist restored: Passed npm security audit.

πŸ€– Generated with Claude Code

MP2EZ and others added 2 commits July 26, 2026 03:03
… no fix needed)

The Security + compliance gate failed repo-wide for roughly an hour with zero repo
changes, blocking every PR including INFRA-306's otherwise-green #221. It then
RECOVERED ON ITS OWN: an untouched `development` worktree went from failing to
"Passed npm security audit" with no edit of any kind, same node_modules, same
lockfile.

So there is nothing to fix in this repo, and this commit deliberately changes no
CI config and no allowlist entry. It adds only a triage note, because the thing
that actually cost the time was a useless error message.

What happened: npm's legacy /-/npm/v1/security/audits/quick endpoint answered
`400 Bad Request - Invalid package tree` for this ~1,185-package tree while
auditing a 20-package control tree fine, and the newer security/advisories/bulk
endpoint returned an undecompressed gzip body. audit-ci surfaced all of it as the
bare, unactionable `code undefined:`.

Eight hypotheses were tested and disproved (full ledger on the INFRA-312 Notion
item). The one never tried was "wait longer" β€” a `gh run rerun --failed` about 30
minutes in still failed, which made the outage look permanent. The note therefore
records the retry window explicitly, plus the two most attractive red herrings:
npm's own "rebuild your package-lock.json" hint (the lockfile was byte-identical
and structurally clean β€” 0 missing versions, 0 link:true, 0 non-numeric versions),
and pinning a newer npm to reach the bulk endpoint (attempted in the since-closed
PR #222; npm 11.18.0 was confirmed active in CI and failed identically).

Verified the gate is healthy rather than merely quiet β€” a gate that passes because
it stopped auditing is the failure class MAINT-307 and INFRA-306 both had to clean
up. Dropping GHSA-mh99-v99m-4gvg from a scratch copy of the allowlist makes
audit-ci exit 1 and print the advisory with its full dependency paths.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@MP2EZ
MP2EZ merged commit d9832fd into development Jul 26, 2026
22 checks passed
@MP2EZ
MP2EZ deleted the chore/INFRA-312-fix-npm-audit-ci-gate branch July 26, 2026 10: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.

1 participant