Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

cargo-audit

$ cargo-audit Foundation Low Risk
RustSec · Security & Secrets · MIT / Apache-2.0 · macos / linux / windows

cargo-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.

FCRS-1.0 Score
91 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install cargo-audit
CLI vs MCP Decision CLI Preferred vs MCP

Auditing Cargo.lock directly with cargo audit --json is local, instant, and requires no MCP integration.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports --json, -q, -n/--no-fetch, -c never color control, and fix --dry-run.

  • Native --json, --no-fetch, and --dry-run support
Trust & Safety 24 / 25

Strictly read-only on project files (only updates ~/.cargo/advisory-db unless -n is set); fix requires explicit invocation.

  • Zero mutation of Cargo.lock during default audit
Setup & Portability 13 / 15

Available via cargo install cargo-audit, brew, and releases; Rust-ecosystem specific.

  • Standard Cargo subcommand across macOS, Linux, and Windows
Utility & Efficiency 13 / 15

Authoritative Rust crate advisory scanner catching CVEs, unsoundness, and yanked crates.

  • Direct integration with official RustSec database
Maintenance & Lineage 9 / 10

Maintained by the RustSec Working Group under MIT / Apache-2.0.

  • Official Rust ecosystem security group
Docs & Verifiability 9 / 10

Clear docs.rs documentation, README, and --help.

  • Well-documented CLI flags and advisory format

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; fetches public RustSec advisory git repo into ~/.cargo/advisory-db unless --no-fetch (-n) is passed.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free and open-source (MIT / Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Audit Cargo.lock against RustSec advisories in JSON
cargo audit --json -q

Checks all locked Rust crates and emits structured JSON vulnerability details.

Run offline audit using cached advisory DB
cargo audit --json -n

Passes -n (--no-fetch) to audit without making network requests.

Controlled Writes & Previews

Preview automatic Cargo.lock security fixes (--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 --json and -n offline 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.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI