Skip to content

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented May 1, 2022

The RustSec Advisory Database contains advisories for both crates and rustc releases, exposing them both programatically.

However, most downstream users are interested only in crate advisories. The rustc advisories, which are versioned according to rustc releases as opposed to the corresponding crate versions, may lead to surprising and unexpected false positives if users don't select the appropriate scope.

Therefore, Query::crate_scope() seems like a more appropriate Default.

See deps-rs/deps.rs#97 for a real-world example of where this caused unexpected false positives.

The RustSec Advisory Database contains advisories for both crates and
rustc releases, exposing them both programatically.

However, most downstream users are interested only in crate advisories.
The rustc advisories, which are versioned according to rustc releases as
opposed to the corresponding crate versions, may lead to surprising and
unexpected false positives if users don't select the appropriate scope.

Therefore, `Query::crate_scope()` seems like a more appropriate
`Default`.

See deps-rs/deps.rs#97 for a real-world example of where this caused
unexpected false positives.
@tarcieri tarcieri changed the title rustsec: use Query::crate_scope() as the Default. rustsec: use Query::crate_scope() as the Default May 1, 2022
@tarcieri tarcieri merged commit 9d9d191 into main May 1, 2022
@tarcieri tarcieri deleted the rustsec/make-crate-scope-default branch May 1, 2022 20:02
@tarcieri tarcieri mentioned this pull request May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant