feat(security): fail-closed npm-audit gate (no critical/high vulns ships)#99
Closed
bdelanghe wants to merge 1 commit into
Closed
feat(security): fail-closed npm-audit gate (no critical/high vulns ships)#99bdelanghe wants to merge 1 commit into
bdelanghe wants to merge 1 commit into
Conversation
…ips) Adds scripts/check-vulns.mjs — re-runs `npm audit` over the lockfile, counts critical+high, and fails closed unless that count is 0 AND matches the committed evidence.vulns value (drift guard), same discipline as the axe/SBOM gates. Wired as a named step in the brand-checks `conformance` job. Scanned: 0 critical / 0 high. Does NOT yet flip the lone `security.no-critical-vulns` conformance row: the vendored conformance-kit (rev bf20952) still folds the vuln count into a combined `security` object shared with OWASP ASVS, so supplying it would force a false ASVS verdict. The row flips with no new evidence once conformance-kit adopts lone's split vulns/asvs schema and the site re-vendors (follow-up). Advances prx-2efn (gate landed; conformance-row flip blocked on the kit split). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded by the re-vendor (#102, merged): conformance-kit e8838ed ships |
bdelanghe
added a commit
that referenced
this pull request
Jun 29, 2026
…d vuln-gate (#103) Vendors the upstream gates/vuln-gate.mjs (from the re-vendored conformance-kit e8838ed), wires it as a fail-closed step in the brand-checks conformance job (VULN_OMIT_DEV=false → all deps), and declares evidence.vulns { knownCriticalOrHighVulns: 0 }. The gate re-runs `npm audit` and fails closed on any critical/high, so the committed 0 cannot drift — same discipline as axe. Scanned: 0 critical / 0 high. Replaces the hand-rolled scripts/check-vulns.mjs (closed PR #99). Lock regenerated (46 files @ e8838ed). Closes prx-2efn. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Adds a fail-closed dependency-vulnerability gate.
scripts/check-vulns.mjsre-runsnpm auditover the committedpackage-lock.json, counts critical + high advisories, and fails CI unless that count is 0 and matches the committedevidence.vulns.knownCriticalOrHighVulns(drift guard) — same discipline as the axe / SBOM gates. Wired as a named step in the brand-checksconformancejob. Scanned: 0 critical / 0 high.Honest scope (important)
This does not yet flip the lone
security.no-critical-vulnsconformance row. The site's vendored conformance-kit (revbf20952) still folds the vuln count into a combinede.securityobject shared with OWASP ASVS — supplying the vuln count alone would force a false ASVS verdict, which the honesty model forbids. lone's source has splitvulns/asvs, but the vendored kit hasn't adopted it.→ The committed
evidence.vulnsis the gate's drift baseline today; the conformance row flips with no new evidence once conformance-kit adopts the split and the site re-vendors. Tracked: prx-0ip7 (unblock), prx-2efn (this).Why ship the gate now anyway
It's independently valuable and honest: the build now refuses to ship with known critical/high vulns, and it pre-positions the evidence for the row flip.
Test plan
node scripts/check-vulns.mjs→ok — 0 known critical/high vulns(verified in the nix devshell).🤖 Generated with Claude Code