Skip to main content

Build provenance: This package is built and distributed by Astral as part of astral-dev-toolchain. It packages cargo-audit from tag cargo-audit/v0.23.0 at commit e3cf3703ed640854af152d019c976ae78211aa22.


RustSec: cargo audit

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

Audit your dependencies for crates with security vulnerabilities reported to the RustSec Advisory Database.

If you want additional function-level reachability context, see reachsec, an experimental standalone companion to cargo audit.

Requirements

cargo audit requires Rust 1.74 or later.

Installation

Packaging status

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.

Only run it on projects you trust. If Cargo.lock is missing, cargo audit runs cargo update --workspace to generate one, and Cargo can execute code from the project it runs in, see Do not run any Cargo commands on untrusted projects. To audit a project you do not trust, pass its lockfile with --file so that cargo audit does not generate one, and run it from a directory outside the project, since Cargo reads configuration from the current directory:

$ cargo audit --file path/to/Cargo.lock

Alpine Linux

# apk add cargo-audit

Arch Linux

# pacman -S cargo-audit

MacOS

$ brew install cargo-audit

OpenBSD

# pkg_add cargo-audit

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 in your Cargo.toml:

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.

cargo audit bin subcommand

Run cargo audit bin followed by the paths to your binaries to audit them:

Screenshot

You can scan a directory recursively using fd:

fd --type=executable --exec-batch cargo audit bin

If your programs have been compiled with cargo auditable, the audit is fully accurate because all the necessary information is embedded in the compiled binary.

For binaries that were not compiled with cargo auditable it will recover a part of the dependency list by parsing panic messages. This will miss any embedded C code (e.g. OpenSSL) as well as roughly half of the Rust dependencies because the Rust compiler is very good at removing unnecessary panics, but that's better than having no vulnerability information whatsoever.

Ignoring advisories

The first and best way to fix a vulnerability is to upgrade the vulnerable crate.

But there may be situations where an upgrade isn't available and the advisory doesn't affect your application. For example the advisory might involve a cargo feature or API that is unused.

In these cases, you can ignore advisories using the --ignore option.

$ cargo audit --ignore RUSTSEC-2017-0001

This option can also be configured via the audit.toml file.

Filtering by target platform

Use --target-arch and --target-os to filter advisories by CPU architecture and operating system. These use Rust's target_arch and target_os values, not full target triples. For the available names, see the platforms crate's Arch documentation and Os documentation. Use the strings shown in the variant descriptions (for example, aarch64 and macos), rather than the Rust enum variant names (AArch64 and MacOS). The registry evolves as Rust adds or removes targets.

Each flag can be repeated to include multiple values:

cargo audit --target-arch x86_64 --target-os linux --target-os windows

The equivalent settings in audit.toml are:

[target]
arch = ["x86_64"]
os = ["linux", "windows"]

Advisories that do not restrict the selected architecture or operating system are still included. By default, neither filter is applied.

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.

Metadata

Release files for astral-dev-toolchain-cargo-audit 0.23.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for astral-dev-toolchain-cargo-audit 0.23.0
File Actions
astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_arm64.whl
astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_amd64.whl
astral_dev_toolchain_cargo_audit-0.23.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for astral_dev_toolchain_cargo_audit-0.23.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
astral_dev_toolchain_cargo_audit-0.23.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for astral_dev_toolchain_cargo_audit-0.23.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
astral_dev_toolchain_cargo_audit-0.23.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for astral_dev_toolchain_cargo_audit-0.23.0-py3-none-macosx_11_0_arm64.whl
astral_dev_toolchain_cargo_audit-0.23.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for astral_dev_toolchain_cargo_audit-0.23.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 37.4 MB

Release files / astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_arm64.whl

Download URL astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_arm64.whl
Size 6.2 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
623f45f830f0cf12b0aa46083985c682bc765b4d9306dcf26b46339b0f25ed4f
BLAKE2b-256 checksum
How to use checksums
e7d814a4216b3b8d46ccb18dbd5b626edaa71118bea765492f430b197dc44de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_amd64.whl

Download URL astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_amd64.whl
Size 6.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2641c1a70da3604c6fb24d8930935a03d7bedb5b60311be491c0dfd1b9df4170
BLAKE2b-256 checksum
How to use checksums
fd144c965ddbb4607449674059ba07d8bb84b59bd53aae615308e1f4d7d41857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_audit-0.23.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL astral_dev_toolchain_cargo_audit-0.23.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
340ca722acf4fae1386735e9f53a45c303f231cf29000b6ee3283aa3879a83ab
BLAKE2b-256 checksum
How to use checksums
18d53f8fbeaa25a89808b6b59d7f90b4cf784e30fbbfe77f5f8adf6e9a719908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_audit-0.23.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL astral_dev_toolchain_cargo_audit-0.23.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.1 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f9b6fceb6cb2ab6063e4bd42f8f6b30622f9bd2c224774c0539a5481ef16d3be
BLAKE2b-256 checksum
How to use checksums
9f99b28a8bef3bfe6cd30b6d3a5e1aa2110e44fa251d68fd225df432363f670d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_audit-0.23.0-py3-none-macosx_11_0_arm64.whl

Download URL astral_dev_toolchain_cargo_audit-0.23.0-py3-none-macosx_11_0_arm64.whl
Size 5.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
610e5dfae694b6866dcf0bdac50203285b6c774b0dc7a53592be9c77b8c31a3f
BLAKE2b-256 checksum
How to use checksums
7671394301268b73996e9c9e8e616dd3ff953adcc7b619809317e420018e32ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_audit-0.23.0-py3-none-macosx_10_12_x86_64.whl

Download URL astral_dev_toolchain_cargo_audit-0.23.0-py3-none-macosx_10_12_x86_64.whl
Size 6.3 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
528a57aacd268912425b03f672ac356a5289c79a38e4ddbe51616f4df0b813d2
BLAKE2b-256 checksum
How to use checksums
6881c1ad7cf1322bf4ee745e9fd9e9a67854fa24aa69662be45f5858111af828
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for astral-dev-toolchain-cargo-audit 0.23.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for astral_dev_toolchain_cargo_audit-0.23.0-py3-none-win_arm64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.23.0 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page