35 releases

0.15.2 Sep 12, 2021
0.15.0 Jul 1, 2021
0.14.0 Mar 8, 2021
0.13.1 Oct 27, 2020
0.2.0 Mar 6, 2017

#16 in Cargo plugins

Download history 6137/week @ 2021-06-07 5734/week @ 2021-06-14 5677/week @ 2021-06-21 6224/week @ 2021-06-28 6045/week @ 2021-07-05 7352/week @ 2021-07-12 7631/week @ 2021-07-19 5336/week @ 2021-07-26 5256/week @ 2021-08-02 5377/week @ 2021-08-09 5873/week @ 2021-08-16 5592/week @ 2021-08-23 5723/week @ 2021-08-30 5570/week @ 2021-09-06 7554/week @ 2021-09-13 7673/week @ 2021-09-20

25,403 downloads per month
Used in cargo-checkmate

Apache-2.0 OR MIT

210KB
4.5K SLoC

RustSec: cargo audit

Latest Version Build Status Safety Dance MSRV Apache 2.0 OR MIT licensed Project Chat

Audit Cargo.lock files for crates with security vulnerabilities reported to the RustSec Advisory Database.

Requirements

cargo audit requires Rust 1.46 or later.

Installation

cargo audit is a Cargo subcommand and can be installed with cargo install:

$ cargo install cargo-audit

Once installed, run cargo audit at the toplevel of any Cargo project.

Screenshot

Screenshot

cargo audit fix subcommand

This tool supports an experimental feature to automatically update Cargo.toml to fix vulnerable dependency requirements.

To enable it, install cargo audit with the fix feature enabled:

$ cargo install cargo-audit --features=fix

Once installed, run cargo audit fix to automatically fix vulnerable dependency requirements:

Screenshot

This will modify Cargo.toml in place. To perform a dry run instead, which shows a preview of what dependencies would be upgraded, run cargo audit fix --dry-run.

Using cargo audit on Travis CI

To automatically run cargo audit on every build in Travis CI, you can add the following to your .travis.yml:

language: rust
cache: cargo # cache cargo-audit once installed
before_script:
  - cargo install --force cargo-audit
  - cargo generate-lockfile
script:
  - cargo audit

Using cargo audit on GitHub Action

Please use audit-check action directly.

Reporting Vulnerabilities

Report vulnerabilities by opening pull requests against the RustSec Advisory Database GitHub repo:

Report Vulnerability

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~7–14MB
~325K SLoC