You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2][bug] cargo-audit-check.sh exits 0 when jq is missing #729
scripts/cargo-audit-check.sh parses cargo audit output with jq. In an
environment without jq it prints
scripts/cargo-audit-check.sh: line 67: jq: command not found
(parse failed)
and then exits 0.
Why it matters
The script is the security gate. CI has jq, so CI has always been right — but
the script exists so anyone can run the same check locally before pushing, and
locally it reports success while having read nothing.
That is how RUSTSEC-2026-0285 (the rustls TLS 1.3 advisory, #728) looked like a
problem introduced by a dependabot PR: I ran this script against main, got a
clean exit, and concluded main was fine. It wasn't — 1.1.0 had shipped with it.
A gate that cannot tell "nothing found" from "could not look" is worse than no
gate, because a green result gets believed.
Fix
Fail fast on a missing dependency, and fail on a parse error rather than
carrying on:
Worth checking the other scripts in scripts/ for the same shape while in
there — anything that pipes to jq and continues on failure has the same
problem.
Related
A second thing hid the same advisory: cargo audit reads a cached advisory
database, and a stale cache reports clean. Worth considering whether the script
should fetch before auditing, or at least report the database's age, so a local
run cannot silently answer from last month's data.
Activity
fix(ci): make the cargo-audit gate fail on a report it cannot parse (#…