Skip to content

fix(fp): correct hosted suppression CPE matching for regexes which previously had trailing colons#8542

Open
chadlwilson wants to merge 1 commit into
dependency-check:generatedSuppressionsfrom
chadlwilson:generatedSuppressions-fix-more-regexes
Open

fix(fp): correct hosted suppression CPE matching for regexes which previously had trailing colons#8542
chadlwilson wants to merge 1 commit into
dependency-check:generatedSuppressionsfrom
chadlwilson:generatedSuppressions-fix-more-regexes

Conversation

@chadlwilson
Copy link
Copy Markdown
Collaborator

Description of Change

Fixes yet another regression from #8522 after the regex conversion - regexes which already had a trailing : in their rule were failing to match some CPE rules from NVD because the new optional suffix was added regardless; requiring it to end in ::.* to match (two colons), which would no longer match anything.

Sorry @nhumblot 😅

Related issues

Have test cases been added to cover the new functionality?

no

…g colons

Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
@chadlwilson
Copy link
Copy Markdown
Collaborator Author

chadlwilson commented May 22, 2026

I don't fully understand how these suppressions were working before for some of the vulns to be honest. An equivalent suppression for different libs using non-regex was failing to match for some CVEs when it had a trailing : after normalisation of the CPE 2.2 URI.

Possibly some quirk in how VulnerableSoftwareIdentifiers are matched in the code and whether they end up with the version in the CPEIdentifier when matched (or not). Perhaps it depends on whether the version in use by the user actually has a CPE entry defined for that specific version in NVD or not, or it's just matching based on a * and ODC's logic.

Probably need to debug or look at the raw DB data coming through for the vulns....

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants