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

cargo-deny

$ cargo-deny Community Low Risk
Embark Studios · Code & DevOps · MIT / Apache-2.0 · macos / linux / windows

Cargo subcommand plugin (cargo deny) that audits Cargo.lock and dependency graphs for security advisories, SPDX license compliance, banned crates, and untrusted registries. Supports structured --format json diagnostics and --offline mode for deterministic headless CI and agent checks.

FCRS-1.0 Score
90 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install cargo-deny
CLI vs MCP Decision CLI Only

Evaluates local Cargo.lock and deny.toml policy directly against cached RustSec databases without MCP overhead.

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

Provides --format json, --color never, --offline, and distinct exit codes per check without any interactive prompts.

  • Supports --format json and --color never on cargo deny check
  • Supports --offline and --locked execution
Trust & Safety 24 / 25

check is read-only against repository files and only writes deny.toml when init is explicitly invoked.

  • Read-only policy verification by default
Setup & Portability 13 / 15

Available via Homebrew, cargo install, and prebuilt GitHub releases on macOS, Linux, and Windows.

  • Prebuilt binaries plus brew and cargo distribution
Utility & Efficiency 13 / 15

Combines vulnerability, license, duplicate-crate, and source checks in one fast Rust binary.

  • Unifies advisory, license, and dependency-graph linting
Maintenance & Lineage 9 / 10

Actively maintained by Embark Studios and widely used across Rust CI pipelines.

  • Mature EmbarkStudios/cargo-deny repository
Docs & Verifiability 8 / 10

Well-structured mdBook manual and --help reference for every deny.toml field.

  • Official documentation at embarkstudios.github.io/cargo-deny

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No authentication required; caches public advisory databases locally under ~/.cargo/advisory-dbs unless --offline is passed.

Side Effects
Read-Only Local Write
Cost & Quotas

Dual MIT / Apache-2.0 open-source CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# cargo-deny Agent Rules
- Always run `cargo deny check --format json --color never` for parseable findings.
- Pass `--offline` in air-gapped or sandboxed environments when the advisory cache is already populated.

Agent-Ready Command Recipes

Safe Read-Only Queries

Check advisories, licenses, and bans in JSON
cargo deny check --format json --color never

Runs all configured policy checks and emits newline-delimited JSON diagnostics without ANSI escapes.

Run offline license audit
cargo deny check licenses --offline --format json

Verifies crate SPDX licenses using only cached databases and Cargo.lock.

Controlled Writes & Previews

Initialize a baseline policy file
cargo deny init

Writes a starter deny.toml configuration file in the workspace root.

Strengths for Agents

  • + Emits clean newline-delimited JSON diagnostics with --format json.
  • + Zero-auth read-only check command covers advisories, licenses, bans, and sources together.

Caveats & Pitfalls

  • ! Requires deny.toml (or cargo deny init) for custom allow/deny rules and only targets Cargo workspaces.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI