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

Add a reason field to ignore config #1337

Closed
gutschet opened this issue Jun 6, 2023 · 3 comments · Fixed by #1532
Closed

Add a reason field to ignore config #1337

gutschet opened this issue Jun 6, 2023 · 3 comments · Fixed by #1532
Assignees
Labels
enhancement New feature or request good-first-issue Good for newcomers

Comments

@gutschet
Copy link

gutschet commented Jun 6, 2023

Hello!

What would you like to be added:

In the yaml config to ignore certain vulnerabilities, it would be nice if we could also add the reason, why we ignore the vulnerabilities. This information would really help us create automated security reports about our images. Here an easy example (only shows the requested feature, the example rule itself does not make sense):

.grype.yaml:

ignore:
  - vulnerability: CVE-2010-0733
    reason: This vulnerability is not relevant in our application, because the vulnerability is only a problem under certain circumstances, that are not present in our application.

Then in our output template, we would love to be able to use this reason:
myTemplate.tmpl:

<p>
    The following vulnerabilities are considered irrelevant:
    <ul>
        {{- range .IgnoredMatches}}
        <li>{{.Vulnerability.ID}} ({{.AppliedIgnoreRules.Reason}})</li>
        {{- end}}
    </ul>
</p>

The output should then look like this:

The following vulnerabilities are considered irrelevant:

-     CVE-2010-0733 (This vulnerability is not relevant in our application, because the vulnerability is only a problem under certain circumstances, that are not present in our application.)

Why is this needed:

Documenting the reason for an ignore rule would help understanding third parties, why we decided to ignore some vulnerabilities. Therefor it would be really helpful for us to be able to use the reason field in an output template, so we can generate the reasons into our security reports.

Kind regards
Timo

@gutschet gutschet added the enhancement New feature or request label Jun 6, 2023
@gh-greg
Copy link

gh-greg commented Jun 8, 2023

(1) Excellent suggestion, @gutschet
(2) Proposed: Create a new Epic.
Perhaps name the Epic, "Improvements_to_Waivers"

Then, Add/Link these 3 tickets below, to the new Epic:

@gutschet
Copy link
Author

@gh-greg , thanks a lot! Hope I did it right!

@tgerla tgerla added this to OSS Jun 14, 2023
@kzantow kzantow moved this to Backlog in OSS Aug 24, 2023
@kzantow kzantow added the good-first-issue Good for newcomers label Aug 24, 2023
@shanduur
Copy link
Contributor

shanduur commented Sep 30, 2023

@kzantow Can you assign me to this issue? I would like to work on it.

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.

4 participants