Skip to content

Bug: Yanked crate advisory gives false negative result if crate is in local cache #724

Open
@sergiimk

Description

Describe the bug

Recently a url 2.5.3 crate was yanked and our CI rightfully started failing with:

error[yanked]: detected yanked crate (try `cargo update -p url`)

However running cargo deny check advisories locally was producing ok for all of our team members.

Only after rm -rf ~/.cargo/registry the problem became reproducible locally.

I suspect that code that check for crate presence finds it in the registry cache without checking the actual status of the crate in the source registry.

To reproduce

You could publish and yank a test crate in crates.io

cargo-deny version

0.16.2

What OS were you running cargo-deny on?

Linux

Additional context

No response

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions