grype
grype copied to clipboard
Consistent sort order for grype output
What would you like to be added: It would be fantastic if the output produced by grype was consistently ordered. It does appear to be sorted by NAME, but a secondary sort by VULNERABILITY would ensure that the output is rendered consistently across runs.
Why is this needed: We commit the output of our grype runs to version control after updating dependencies. The inconsistent sorting creates unnecessarily complex diffs.
I agree with the value of this enhancement. The proposed "consistently rendered output", any consistent sort whatsoever, makes diffs possible.
:heavy_plus_sign: :one: for this one :smile_cat:
Also, is sorted from Critical
-> Negligible
it would make | head
much more interesting as people usually are looking for the worst one.
So finally it leads to make grype
more efficient for end user :muscle: :pray:
Thanks for the issue @exortech! This looks like a pretty good option for a community PR or first issue if anyone on this thread wants to take a stab. If not I'll try and get around to this as soon as I have some time.
➕ 1️⃣ for this one
I've added a PR to this issue for the table sort - if that's what we're looking for I'll go ahead and get one added for machine readable formats
This was closed because the table sort PR was merged - there are some small follow up coming for the other presenters here as well.