How to Audit Unsafe Code in Rust Dependencies (cargo-audit, cargo-geiger)

Install and run cargo-audit and cargo-geiger to scan Rust dependencies for security vulnerabilities and unsafe code.

Run cargo audit to check for known security vulnerabilities and cargo geiger to detect unsafe code in your dependencies.

  1. Install the audit tool: cargo install cargo-audit
  2. Install the geiger tool: cargo install cargo-geiger
  3. Scan your project for security vulnerabilities: cargo audit
  4. Scan your project for unsafe code usage: cargo geiger
cargo install cargo-audit cargo-geiger
cargo audit
cargo geiger