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

Log when non-base suppressions rules are unused #4709

Merged
merged 26 commits into from Aug 18, 2022
Merged

Conversation

jeremylong
Copy link
Owner

Supersedes #4687

Fixes #4685

This might be useful to some - a log message has been added when a non-base suppression rule was not used.

@boring-cyborg boring-cyborg bot added ant changes to ant core changes to core tests test cases labels Jul 27, 2022
@jeremylong jeremylong added this to the 7.1.2 milestone Jul 27, 2022
@jeremylong jeremylong requested a review from aikebah July 27, 2022 11:09
@aikebah
Copy link
Collaborator

aikebah commented Aug 1, 2022

Need to get my head around the why, but it appears to break the suppression of 83e0f64

causing integration-test 629 to fail as cbor gets bundled with ion as the CVE is no longer suppressed for ion

@jeremylong
Copy link
Owner Author

I've been off and on looking at this as time permits - I haven't been able to figure out why this PR breaks 629 and does not suppress the CVE for ion...

@aikebah
Copy link
Collaborator

aikebah commented Aug 10, 2022

I've been off and on looking at this as time permits - I haven't been able to figure out why this PR breaks 629 and does not suppress the CVE for ion...

Added a few pieces of targeted debugging and finally got around the root-cause... the singleton is reused in CPESuppressionAnalyzer and VulnerabilitySuppressionAnalyzer, so rather that 55 CVE suppressions + 3 vulnerabilityName suppressions the VulnerabilitySuppressionAnalyzer runs with the same 508 CPE suppression rules that the CPESuppressionAnalyzer uses

[WARNING] CpeSuppressionAnalyzer with 508 suppressionRules
...
[WARNING] VulnerabilitySuppressionAnalyzer with 508 suppressionRules

The base suppressions have 560 rules, 49 contain only CVEs, 3 only vulnerabiltyNames, 502 only CPE and 6 a mixture of CPE and CVE. So out of the 58 rules that VulnerabilitySuppressionAnalyzer should take into account only the 6 that also have CPE suppressions are taken into account.

So filtering out the applicable rules needs to move from rules-loading to suppression processing evaluation or we need separate CPE and vulnerabilitySuppression ruleset singletons.

jeremylong and others added 16 commits August 17, 2022 06:14
Bumps ossindex-service-client from 1.8.1 to 1.8.2.

---
updated-dependencies:
- dependency-name: org.sonatype.ossindex:ossindex-service-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This extends the existing regex to also cover all Quarkus
Liquibase artifacts. See https://regex101.com/r/2xOJwo/1
for a regex test.

Fixes #4630
Co-authored-by: Hans Aikema <aikebah-github@aikebah.net>
Bumps [maven-reporting-api](https://github.com/apache/maven-reporting-api) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/apache/maven-reporting-api/releases)
- [Commits](apache/maven-reporting-api@maven-reporting-api-3.1.0...maven-reporting-api-3.1.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.reporting:maven-reporting-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.4.0 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](pgjdbc/pgjdbc@REL42.4.0...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [maven-site-plugin](https://github.com/apache/maven-site-plugin) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/apache/maven-site-plugin/releases)
- [Commits](apache/maven-site-plugin@maven-site-plugin-3.12.0...maven-site-plugin-3.12.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-site-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
yarnAuditAnalyzer cannot be enabled if we don't have yarn.lock is added to mixedLangSet.
@boring-cyborg boring-cyborg bot added the maven changes to the maven plugin label Aug 17, 2022
Copy link
Collaborator

@aikebah aikebah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some minor improvements requested

jeremylong and others added 5 commits August 18, 2022 06:59
…SuppressionAnalyzer.java

Co-authored-by: Hans Aikema <aikebah-github@aikebah.net>
…SuppressionAnalyzer.java

Co-authored-by: Hans Aikema <aikebah-github@aikebah.net>
@aikebah aikebah merged commit b4b432a into main Aug 18, 2022
@jeremylong jeremylong deleted the logUnusedSuppressionRules branch August 20, 2022 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ant changes to ant core changes to core maven changes to the maven plugin tests test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Identify suppressions that are no longer needed.
6 participants