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

Fix false positives in CPE matching due to ambiguous vendor/product relations #3209

Merged
merged 6 commits into from
Nov 20, 2023

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Nov 17, 2023

Description

Fixes false positives in CPE matching by discarding matches where relations of the vendor and product attributes are ambiguous.

Previously, the following component CPE:

cpe:2.3:a:*:zstandard:1.5.2:*:*:*:*:*:*:*

was getting matched with the following CVE CPEs:

cpe:2.3:h:amd:*:*:*:*:*:*:*:*:*
cpe:2.3:a:pascom_cloud_phone_system:*:*:*:*:*:*:*:*:*
cpe:2.3:h:intel:*:*:*:*:*:*:*:*:*

Due to the vendor comparison yielding a SUBSET, and the product comparison yielding a SUPERSET relation. Both SUBSET and SUPERSET on their own can be considered a match, but in combination they can cause ambiguities like above.

Addressed Issue

Fixes #3178

Additional Details

Depends on stevespringett/CPE-Parser#181

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have added corresponding update logic
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@nscuro nscuro added this to the 4.10 milestone Nov 17, 2023
@nscuro nscuro marked this pull request as draft November 17, 2023 13:24
@nscuro nscuro changed the title Implement minimum required CPE name comparison relations Fix false positives in CPE matching due to ambiguous vendor/product relations Nov 19, 2023
@nscuro nscuro marked this pull request as ready for review November 20, 2023 17:31
Signed-off-by: nscuro <[email protected]>
Copy link

@Jasper-Ben Jasper-Ben left a comment

Choose a reason for hiding this comment

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

LGTM :)

@nscuro nscuro merged commit c8fdd2b into DependencyTrack:master Nov 20, 2023
7 checks passed
@nscuro nscuro deleted the issue-3178 branch November 20, 2023 18:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPE matching: Fix false positives due to wildcard (*) in Component CPE
2 participants