Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggest cmd can suggest same crate+version multiple times #481

Closed
repi opened this issue May 26, 2023 · 4 comments
Closed

suggest cmd can suggest same crate+version multiple times #481

repi opened this issue May 26, 2023 · 4 comments

Comments

@repi
Copy link

repi commented May 26, 2023

For a few unaudited crates in our project running cargo vet suggest lists them multiple times even though they are the same version. Not a major issue though but just a bit odd so thought I should report it.

example:

    cargo vet inspect parking_lot 0.11.2                                                                      (used by bb8, sled, console-subscriber)                        (5584 lines)
    cargo vet inspect parking_lot 0.11.2                                                                      (used by cpal, eterm, pprof, tokio, and 49 others)             (5584 lines)
    cargo vet inspect bitflags 1.3.2                                                                          (used by ndk, nix, nix, nix, png, ron, and 45 others)          (2998 lines)
    cargo vet inspect bitflags 1.3.2                                                                          (used by minidump-writer, fxprof-processed-profile)            (2998 lines)
    cargo vet inspect memoffset 0.6.5                                                                         (used by nix, nix, ark-render)                                 (1007 lines)
    cargo vet inspect memoffset 0.6.5                                                                         (used by speedy)                                               (1007 lines)
    cargo vet inspect memoffset 0.6.5                                                                         (used by crossbeam-epoch, and 2 others)                        (1007 lines)

it also in some cases duplicates the same crate in the "used by", such has in used by ndk, nix, nix, nix, png, ron, and 45 others in the above, would have expected it to list nix just once there.

@bholley
Copy link
Collaborator

bholley commented May 26, 2023

@repi Thanks for the report, would be good to get that fixed.

Is it perhaps the case that (1) you have both parking_lot 0.11.2 and parking_lot X.Y.Z in the tree, and (2) you have a delta audit for parking_lot X.Y.Z -> 0.11.2? That might plausibly cause this behavior (since each of the suggestions corresponds to a different node in your crate graph, but the suggested action happens to be the same).

If not, is there a way you could provide a minimized testcase?

@repi
Copy link
Author

repi commented May 26, 2023

we have 2 parking_lot crates used in this workspace and the lockfile, 0.11.2 and 0.12.1, the memoffset and bitflags crates we also have multiple versions of so that is probably the source of confusion here.

wrt to parking_lot we have a single audit imported for it:

[[audits.zcash.audits.parking_lot]]
who = "Jack Grigg <jack@z.cash>"
criteria = "safe-to-deploy"
delta = "0.11.2 -> 0.12.1"
notes = "Most `unsafe {}` changes were to reduce the scope of the unsafe blocks. I didn't closely review the migration to the asm! macro but it looks reasonable."
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"

and also a single exemption (generated by cargo vet generate exemptions):

[[exemptions.parking_lot]]
version = "0.11.2"
criteria = "safe-to-deploy"

so this combination is probably what is causing it somehow.

@mystor
Copy link
Collaborator

mystor commented May 26, 2023

The patches in #483 should fix this duplication issue. I believe it is caused by that imported delta audit and generated exemption entry as you expected.

@bholley bholley closed this as completed Jun 1, 2023
@repi
Copy link
Author

repi commented Jun 2, 2023

thanks!

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

No branches or pull requests

3 participants