cargo-audit
$ cargo-audit Foundation Low Riskcargo-audit (cargo audit) checks Cargo.lock dependencies against the RustSec Advisory Database for CVEs, unmaintained crates, and yanked versions. Auditing is read-only with clean --json output, while cargo audit fix --dry-run previews safe lockfile upgrades.
brew install cargo-audit Auditing Cargo.lock directly with cargo audit --json is local, instant, and requires no MCP integration.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --json, -q, -n/--no-fetch, -c never color control, and fix --dry-run.
- Native
--json,--no-fetch, and--dry-runsupport
Strictly read-only on project files (only updates ~/.cargo/advisory-db unless -n is set); fix requires explicit invocation.
- Zero mutation of
Cargo.lockduring default audit
Available via cargo install cargo-audit, brew, and releases; Rust-ecosystem specific.
- Standard Cargo subcommand across macOS, Linux, and Windows
Authoritative Rust crate advisory scanner catching CVEs, unsoundness, and yanked crates.
- Direct integration with official RustSec database
Maintained by the RustSec Working Group under MIT / Apache-2.0.
- Official Rust ecosystem security group
Clear docs.rs documentation, README, and --help.
- Well-documented CLI flags and advisory format
Security, Auth & Guardrails
None required; fetches public RustSec advisory git repo into ~/.cargo/advisory-db unless --no-fetch (-n) is passed.
100% free and open-source (MIT / Apache-2.0).
# cargo-audit Agent Rules - Always pass `--json -q` (and `-n`/`--no-fetch` when offline with a cached DB). - Treat exit code `1` as advisory findings rather than a crash; run `cargo audit fix --dry-run` before applying lockfile upgrades.
Agent-Ready Command Recipes
Safe Read-Only Queries
Cargo.lock against RustSec advisories in JSON cargo audit --json -q
Checks all locked Rust crates and emits structured JSON vulnerability details.
cargo audit --json -n
Passes -n (--no-fetch) to audit without making network requests.
Controlled Writes & Previews
--dry-run) cargo audit fix --dry-run
Simulates upgrading vulnerable crates in Cargo.lock without writing changes (requires fix feature).
Strengths for Agents
- + Authoritative RustSec advisory auditing with
--jsonand-noffline cache mode. - + Zero credentials needed and strictly read-only by default.
Caveats & Pitfalls
- ! Requires
Cargo.lock(binary/workspace projects) and only covers the Rust ecosystem.