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

CPE: Fix false negative on part comparison #180

Conversation

Jasper-Ben
Copy link
Contributor

Previously, comparing CPEs will cause false negatives, if the component (right) "part" contains an "ANY" value, while the CVE (left) contains a string value or logical value "NA".

Instead, this should return a match, as defined by cases 5, 13, 15 within table 6-2 in the NIST name matching specification.

@jeremylong
Copy link
Collaborator

Looks like the test case may need to be updated also?

@Jasper-Ben
Copy link
Contributor Author

Jasper-Ben commented Sep 4, 2023 via email

@Jasper-Ben Jasper-Ben force-pushed the fix_false_negative_when_component_CPE_part_is_any branch from 0270865 to 5b9ca5f Compare September 4, 2023 10:44
@Jasper-Ben
Copy link
Contributor Author

Testcases should be fixed now. I also added some comments to the code for easier understanding of the changes.

Previously, comparing CPEs will cause false negatives, if the component
(right) "part" contains an "ANY" value, while the CVE (left) contains a
string value or logical value "NA".

Instead, this should return a match, as defined by cases 5, 13, 15
within table 6-2 in the [NIST name matching specification](https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7696.pdf).
@Jasper-Ben Jasper-Ben force-pushed the fix_false_negative_when_component_CPE_part_is_any branch from 5b9ca5f to 183ff71 Compare September 4, 2023 21:30
@Jasper-Ben
Copy link
Contributor Author

Fixed minor typo.

@stevespringett
Copy link
Owner

@Jasper-Ben Thanks for identifying and fixing the issue.

@stevespringett stevespringett merged commit 0521b55 into stevespringett:master Sep 4, 2023
3 checks passed
@Jasper-Ben Jasper-Ben deleted the fix_false_negative_when_component_CPE_part_is_any branch September 4, 2023 23:33
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.

3 participants