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

Include unused suppression rules in output report #7165

Open
gtaylor1981 opened this issue Nov 15, 2024 · 2 comments
Open

Include unused suppression rules in output report #7165

gtaylor1981 opened this issue Nov 15, 2024 · 2 comments

Comments

@gtaylor1981
Copy link

gtaylor1981 commented Nov 15, 2024

The UnusedSuppressionRuleAnalyzer is very useful but unfortunately its output is buried in the build output.
Ideally, we would have zero suppressions that we did not need.

Would it instead be possible to include each failed suppression in the output report, e.g. as failed testcases?
This would be opt-in, with a setting like report-unused-suppressions-as-failures.

Alternatives (such as using grep on the build output) aren't as clean, e.g. they might fail if the logged message changes.
They would also have to be implemented in each build script we have.

The proposed solution would just need enabling in the options, then would automatically be compatible with our existing usage.

A bonus feature could also be that active suppression rules (i.e. those that are not unused) could be listed as successful testcases, making it possible to see all suppressions as part of the output, regardless of whether they were unused or not.

@aikebah
Copy link
Collaborator

aikebah commented Nov 19, 2024

Suppression rules' usage are in my view not a proper part of the report. The report should concern the vulnerabilities encountered.

Successful suppression rules' effects are already in the output (succesfully suppressed vulns are reported as skipped tests).

What I could envision to address your initial concern (proliferation of obsolete suppressions) would be a configuration-flag to opt-in on breaking the build on unused suppressions.

@danshome
Copy link

I like the idea of being able to break the build if you have unused suppression rules. +1 for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants