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.
- Install the audit tool:
cargo install cargo-audit
- Install the geiger tool:
cargo install cargo-geiger
- Scan your project for security vulnerabilities:
cargo audit
- Scan your project for unsafe code usage:
cargo geiger
cargo install cargo-audit cargo-geiger
cargo audit
cargo geiger
These tools act like a security scanner for your software's ingredients. They check the external libraries you use to ensure they don't have known security holes or dangerous code that could crash your program. Think of it as checking the expiration dates and safety seals on every ingredient before you cook.