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

Show all vulnerabilities, even suppressed #887

Closed
tafli opened this issue Aug 23, 2022 · 13 comments · Fixed by #966
Closed

Show all vulnerabilities, even suppressed #887

tafli opened this issue Aug 23, 2022 · 13 comments · Fixed by #966
Labels
enhancement New feature or request good-first-issue Good for newcomers

Comments

@tafli
Copy link

tafli commented Aug 23, 2022

What would you like to be added:
We're using Grype together with Syft in our CI Pipeline to scan built images. We also using a suppression file to mitigate problem.

However I haven't found a way to show all unfiltered vulnerabilities of a scan. So I like to see even the suppressed vulnerabilities in the output list. Maybe a (suppressed) should be added after the name.

Why is this needed:
When using Grype in our CI-Pipeline with suppression, we don't see what is suppressed, without looking at the suppression file.

@tafli tafli added the enhancement New feature or request label Aug 23, 2022
@freedom-isnotanarchy
Copy link

freedom-isnotanarchy commented Aug 25, 2022

(1) Good enhancement. Our company, could use this too.
(2) I wonder if this (below), would be preferable ?
The "FIXED-IN" filed value, has "-(suppressed)" , appended

NAME                            INSTALLED            FIXED-IN   TYPE          VULNERABILITY   SEVERITY
geronimo-activation_1.1_spec    1.1-(suppressed)     -          java-archive  CVE-2011-5034   High
geronimo-activation_1.1_spec    1.1-(suppressed)     2.0        java-archive  CVE-2008-0732   Low
geronimo-javamail_1.4_mail      1.8.4-(suppressed)   _          java-archive  CVE-2011-5034   High
geronimo-javamail_1.4_mail      1.8.4-(suppressed)   _          java-archive  CVE-2008-0732   Low

@kzantow
Copy link
Contributor

kzantow commented Sep 29, 2022

This sounds like a great addition! We would like the default behavior to remain the same but we absolutely accept PRs for things like this!

@spiffcs spiffcs added the good-first-issue Good for newcomers label Oct 6, 2022
@vimalpatel19
Copy link
Contributor

Hi grype maintainers! I would like to contribute and assist with this.

@kzantow
Copy link
Contributor

kzantow commented Oct 21, 2022

@vimalpatel19 that would be great! I'd suggest maybe we think about adding (suppressed) to the SEVERITY column as opposed to installed or fixed-in.

@vimalpatel19
Copy link
Contributor

@kzantow Got it! Before I begin working on this, I just wanted to confirm the context for this:

Instead of not adding the filtered out vulnerabilities to the output list, we will instead include them and append -(suppressed) to the value in the SEVERITY column for those filtered out vulnerabilities when the user passes in a new command line flag such as -a or --all, or something along those lines. Does that sound right?

@kzantow
Copy link
Contributor

kzantow commented Oct 21, 2022

@vimalpatel19 yeah, something like that... maybe the flag could be --show-suppressed or --include-suppressed?

@freedom-isnotanarchy
Copy link

freedom-isnotanarchy commented Oct 21, 2022

Regarding "--include-suppressed " : I see a certain symmetry below, with what Grype has today.
However, you 2 would know better.
Can you Imagine, any future "--show-SOMETHING" , enhancement possibilities in the future ?
@vimalpatel19 , @kzantow

--include-suppressed    "Instead of not adding the filtered out vulnerabilities to the output list, we will instead include them "
--exclude               stringArray     exclude paths from being scanned using a glob expression
--only-fixed            ignore matches for vulnerabilities that are not fixed
--only-notfixed         ignore matches for vulnerabilities that are fixed

@vimalpatel19
Copy link
Contributor

@freedom-isnotanarchy makes sense. I was leaning towards --include-suppressed already before reading your comment!

@vimalpatel19
Copy link
Contributor

@kzantow do you think we need to implement this flag for just the table output format? Or should it also be implemented for the other output formats that don't already print the suppressed items?

@vimalpatel19
Copy link
Contributor

@kzantow I have opened up the following pull request above with initial changes. Can you please review when you get a chance?

@kzantow
Copy link
Contributor

kzantow commented Oct 25, 2022

Just to make sure this issue is updated with the same info as the PR: #966 (comment)

I think we should just update the table to include this 👍

@vimalpatel19
Copy link
Contributor

Sounds good, I will proceed with just the table output format then!

@josesa-xx
Copy link

Seems like this is "always" the default but it shouldn't.
Issue #1053 opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-first-issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants