Environment:
$ rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)
$ cargo --version
cargo 1.85.0 (d73d2caf9 2024-12-31)
$ cargo-audit --version
cargo-audit 0.21.1
Steps to reproduce:
- create a project with some dependencies (the project's Rust edition can be either 2021 or 2024)
cargo new --vcs none foo
cd foo
cargo add clap
- audit this project
-
delete ~/.cargo/registry and ~/.cargo/.global-cache
-
audit this project offline
cargo fetch
cargo audit --no-fetch
Expected results: (2) and (4) should produce identical results
Actual results:
(2) works, but (4) produces lots of error: couldn't check if the package is yanked: not found: No such crate in crates.io index: messages.
Neither reinstalling cargo-audit to get latest crates.io dependencies, nor installing with cargo install --git 'https://github.com/rustsec/rustsec.git' cargo-audit, had any effect on this issue.
With downgrading to Rust/Cargo 1.84.1 and repeating the steps, the errors do not occur.