ci: let the dependency audit fail - #69
Conversation
Both `npm audit --audit-level=high` steps had continue-on-error: true, so the Dependency Audit job could never go red. Evidence: PR #61's Security Scan run printed several "Severity: high" findings and the job concluded success; the check stayed green throughout a period when GitHub showed one critical and six high alerts. A check that cannot fail is not evidence of anything -- the F-7 shape -- and it is what any notification layered on this workflow would have reported as "Security CI passed". Removes both flags. Verified: both audits exit 0 today (root: 0 vulnerabilities after #63; web: 0 high/critical), so this does not turn the check red now, only when a new high or critical advisory lands. Dependency Audit is not one of the two required status checks (Build Frontend, Test Smart Contracts), so a red run is a signal, never a merge block. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
unixwhisperer
left a comment
There was a problem hiding this comment.
Approving — the change is right and I'm the workflow code owner, so this was waiting on me. One thing you need to know before you hit merge, because it contradicts the PR body.
The "safe to merge now" premise no longer holds
The PR says:
Both audits exit 0 today (root: 0 vulnerabilities after #63; web: 0 high/critical), so this doesn't turn the check red now, only when a new high/critical advisory lands.
That is no longer true. I reproduced CI exactly — clean git worktree checkout of origin/main, no npm ci (the workflow doesn't run one), npm audit --audit-level=high in both locations:
root: exit 1 {critical: 1, high: 8, moderate: 4, total: 13}
web: exit 1 {critical: 0, high: 2, moderate: 16, low: 5, total: 23}
Lockfiles verified byte-identical to main, so this is the same dependency set CI audits. Merging this will turn Dependency Audit red on the next run, immediately — not "only when a new advisory lands."
What's flagged — all dev/test tooling, no contract surface
critical vitest Vitest UI server: arbitrary file read + execute (via vite)
high vite path traversal in optimized-deps .map handling
high ws DoS via many HTTP headers; uninitialized memory disclosure
high smol-toml DoS via malformed TOML
high @clarigen/* transitive, via @stacks/blockchain-api-client -> socket.io-client, ws
Worth saying plainly: none of this touches the contracts. The contracts are Clarity; this is the JS test/build harness. The vitest/vite critical requires the Vitest UI server to be listening, which it isn't in CI. So this is real but low-urgency, and it is not a reason to hold the PR.
Why I'm still approving, and in fact more strongly
This makes your case better, not worse. Your #61 evidence was that a check could stay green while findings printed. The current state is the stronger version: there is 1 critical and 8 high in the tree right now, and Dependency Audit is green on main today. That is precisely the false-assurance shape you're removing, sitting live rather than in a past run.
Your two safety arguments both survive intact: Dependency Audit is not a required check, so red never blocks a merge; and a signal that can't go red isn't a signal. Merging this makes CI start telling the truth. The truth just happens to be red on day one.
What I'd ask
- Expect the red and don't read it as regression. If Dependency Audit goes red the moment this lands, that's the change working. Worth a line in the merge comment so neither of us re-litigates it in a week.
- Don't let it sit red indefinitely. A permanently-red check gets ignored exactly like a permanently-green one — different failure, same end state. Most of this resolves through the
vite/vitestupgrade path; the@clarigen/*chain is transitive and may need to wait upstream. Happy to take the triage as a follow-up and file what can't be fixed as an accepted-risk row in the findings register, the way F-6 is handled. - Unrelated but worth knowing: I could not explain why this PR's own Security Scan run went green on 21 Sep with the flag already removed — the advisories involved predate that run (
smol-toml9 Sep,wsandviteJune). Same lockfile, same command. I'd re-run the workflow on this branch before merging to see today's answer rather than the cached one. Not a blocker, but I'd rather flag an unexplained green than assume it away — that's the same instinct this PR is built on.
Verified, no action needed
- Diff is exactly the two
continue-on-error: trueremovals plus the explanatory comment. Nothing else in the file. - YAML still parses.
codeqljob untouched..github/workflows/CODEOWNERS approval: that's this review.
This unblocks Slack Stage 2 (Flashstack-ajv.2.9) — once audit failures are real workflow failures, a Slack security summary can report something meaningful. Stage 1 spec is in #72; Stage 2 stays unbuilt until this is on main.
…irst You flagged this in the #66 review and offered either of us carry it -- taking it here since #68/#65/#69 all merged to main in between your "246" figure (computed against pre-#68 main) and now. 221 (post-#65) + 8 (#68, v3-pools-pause-gate) + 9 (testnet-preconditions, this PR's first commit) + 16 (parse-steps, this PR's second commit) = 254, across 23 files. Verified by running the suite on this branch merged with current main, not by arithmetic alone. README.md (badge, Security bullet, Quick start) and ROADMAP.md (x2) were still at 221 -- a gap I left when I did the #65 reconciliation and only updated AUDIT_SCOPE.md's count, not these. Fixed here too so the same drift doesn't need a fourth pass. clarinet check: 211 contracts, 0 errors (unchanged). Suite: 254/254 across 23 files. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Correction: my audit numbers in the review above are wrong. Disregard that section. Matt reproduced and couldn't get them, and he's right — I measured a stale tree. Root causeMy verification worktree was cut from I cut the worktree at ~15:43 on the 22nd, so it came from
My "lockfiles verified byte-identical to main" check didn't catch it because it compared stale-to-stale — my working branch was also cut from Correct numbers, re-measured on
|
Summary
Removes
continue-on-error: truefrom bothnpm audit --audit-level=highsteps insecurity.yml, so the Dependency Audit job can actually go red.Why
With the flag set, the job passed unconditionally. Evidence from PR #61's Security Scan run (before the deps fix in #63): the audit step printed several
Severity: highfindings and the job's conclusion was success. It stayed green while GitHub showed one critical and six high alerts. A check that can't fail isn't evidence of anything, which is the F-7 shape, and it's what a Slack "Security CI" summary (proposed by Hillary) would have reported as all-clear. This should land before any such notification.Safe to merge now
Build FrontendandTest Smart Contractsare), so a red run is a signal and never blocks a merge.Trade-off worth knowing
A new advisory can turn Dependency Audit red on an unrelated PR. That's the intended signal, but it can look like noise. The weekly Monday run means it's caught even without PR traffic.
npm auditalso depends on the registry being reachable, so a transient network failure will show as red too..github/workflows/is CODEOWNERS-protected (Hillary).🤖 Generated with Claude Code