Skip to content

Fix CPE matching logic for NVD Rest#4339

Merged
nscuro merged 1 commit intoDependencyTrack:masterfrom
calderonth:fix-cpe-match-signed
Oct 29, 2024
Merged

Fix CPE matching logic for NVD Rest#4339
nscuro merged 1 commit intoDependencyTrack:masterfrom
calderonth:fix-cpe-match-signed

Conversation

@calderonth
Copy link
Copy Markdown
Contributor

Description

This aligns the CPE matching logic for NVD between the feed and the REST API. I believe that when the logic was ported the nodeOperator was not properly copied over.
I added an additional unit-test to demonstrate where it previously failed and changing the operator does not break the previous unit-test either.

Addressed Issue

Fixes #4255

Additional Details

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

Signed-off-by: Thomas Calderon <[email protected]>
@calderonth calderonth force-pushed the fix-cpe-match-signed branch from 3f44b42 to 7f915f7 Compare October 29, 2024 11:39
@nscuro nscuro added defect Something isn't working backport/4.12.2 labels Oct 29, 2024
@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.03% (target: -1.00%) 100.00% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d90a16e) 22551 17846 79.14%
Head commit (7f915f7) 22551 (+0) 17839 (-7) 79.11% (-0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4339) 1 1 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link
Copy Markdown
Member

@nscuro nscuro left a comment

Choose a reason for hiding this comment

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

Thanks @calderonth!

@nscuro nscuro merged commit 6ac5c10 into DependencyTrack:master Oct 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent NVD known affected software in Dtrack

2 participants