-
Notifications
You must be signed in to change notification settings - Fork 49
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
FR: Surfacing prior certification information in cargo vet diff
output
#417
Comments
I'm not sure I understand what you mean by this. A delta audit is only ever auditing the specific delta, and not the entire history of the crate. If I'm pretty sure we also won't suggest adding a delta-audit for I'm guessing what you mean by "only has an existing audit for
This is quite We could potentially look into doing a full search of the criteria certified for the from node in addition to determining which criteria we want to support so that we can include more context about what criteria the base revision was certified for. Perhaps this could be behind another flag to avoid adding noise in situations where it's not desirable. Perhaps it'd look something like this (not sure how best to represent it?):
|
Ah, yes, this is exactly correct. I guess I've been thinking about exemptions as a hammer for TODOs rather than a more general ... well, exemption. My mistake :)
Totally agree - I wasn't trying to suggest that audits are run for every possible criteria; more that knowing the existing state of audits for prior versions is helpful when trying to audit a diff.
I think this looks good! To your point earlier, maybe there's a case to be made for trimming information that |
I think there's a pretty important UX issue here -- a tool that feels like it has good UX but actually requires manually reading many of the same files from which it pulls the data in the UI easily leads to assumptions and human mistakes. As an example, I was doing a delta review and looked into audit.toml to find the previous baseline for a crate. The deltas weren't in order and I looked at an older one, leading me to suggest Right now,
keys here:
|
I like the suggestion in #417 (comment) and I tried to explore how to implement just the "defaults to the baseline" for AFAICT The main challenge here (at least for me) would be figuring out what exactly we mean by "baseline". This is complicated by the
So, when |
To my understanding, the suggestions here are not to change anything about when we're doing full audits, but rather to delta audits. The suggestion appears to be that, when doing a delta audit, instead of suggesting the minimal set of criteria which will "heal" the audit graph based on the policy, we suggest the maximal set of criteria which would lead to the "to" version of the delta audit being certified for more criteria. So for example, if there were 4 criteria (A-D), and the base audit was certified for (A, B), we'd suggest a delta audit for To me the concept of "baseline" in this scenario seems fairly clear. As there is an explicit base revision being checked, we can look at what criteria are satisfied for that crate, and suggest those criteria. This is roughly what I did in #614. Is this correct? I want to be confident I'm understanding the requests from folks actually using custom criteria here.
Yes, this would be what would be found if we checked which criteria are satisfied for A small note from #417 (comment) (emphasis mine)
It is fully OK to "over-specify" criteria for a delta audit (i.e. provide a delta audit which specifies more criteria than can actually be certified given the other audits which are present), though the final crate will still only certify for the base criteria. We can't be blocking/rejecting those, but cargo-vet will never suggest them. For example, if you have criteria |
Taking the three sections of the previous comment in turn: Yes, in my experience the most common delta reviews have no changes to the criteria. If I am likely missing something, but I think the baseline for a delta audit should simply be the criteria of the "old" version, regardless of any implications. In @anforowicz's example, that would be This is news to me! Restating to check understanding, in @anforowicz's example, if I certified I suppose rejecting such reviews is problematic because, among other reasons, it could mean that merging audit.toml's leads to a rejection. |
I think it would be useful for
cargo vet diff
to surface information about previous audits of a given crate.For example, after running
cargo update
earlier,cargo vet
said that I needed to review an update ofsemver
from1.0.13
to1.0.16
. Runningcargo vet diff semver 1.0.13 1.0.16
gave me the following output:What's left unsaid so far is that
[email protected]
only has an existing audit forsafe-to-run
, so I will have to audit the entirety ofsemver
fordoes-not-implement-crypto
.Further - and this is probably more specific to
does-not-implement-crypto
- even ifsemver
had been properly audited fordoes-not-implement-crypto
before (orcrypto-safe
, whichdoes-not-implement-crypto
implies), I need to know which of those had been audited for so I can choose the correct one to "carry forward" in this diff audit.Including something like the following in
cargo vet diff
output would helpful :)The text was updated successfully, but these errors were encountered: