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: orient by cve merging #1046

Merged
merged 8 commits into from
Jan 4, 2023

Conversation

kzantow
Copy link
Contributor

@kzantow kzantow commented Dec 23, 2022

This PR corrects an issue when orienting results by CVE that may result in related vulnerabilities and CPEs being lost in output during the match merge process. This was also the cause of an intermittent test failure, which should now be resolved.

Signed-off-by: Keith Zantow <[email protected]>
Signed-off-by: Keith Zantow <[email protected]>
@kzantow kzantow requested a review from a team December 23, 2022 21:23
Comment on lines +561 to +566
RelatedVulnerabilities: []vulnerability.Reference{
{
ID: "GHSA-2014-fake-3",
Namespace: "github:language:ruby",
},
},
Copy link
Contributor Author

@kzantow kzantow Jan 4, 2023

Choose a reason for hiding this comment

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

This is one of the non-CPE changes with this PR: additional fields will be merged.

@@ -42,17 +44,56 @@ func (m *Match) Merge(other Match) error {
return ErrCannotMerge
}

// there are cases related vulnerabilities are synthetic, for example when
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes below here are the main gist of this PR unrelated to the CPE refactoring

Copy link
Contributor

@wagoodman wagoodman left a comment

Choose a reason for hiding this comment

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

thanks for taking the time to also clean up the must(pkg.NewCPE... calls that have been piling up 🙌

@kzantow kzantow merged commit 04a84a4 into anchore:main Jan 4, 2023
spiffcs added a commit to willyw0nka/grype that referenced this pull request Jan 24, 2023
* main: (56 commits)
  fix: always include severity in cyclonedx output (anchore#1067)
  Update Syft to v0.68.0 (anchore#1064)
  Add protobuf FPs to default ignore list (anchore#1062)
  chore: update Syft to v0.66.2 (anchore#1060)
  Update grype bootstrap tools to latest versions. (anchore#1055)
  feat: allow grype db diff to specify local db directories (anchore#1058)
  chore: claim artifacthub package ownership from developer-guy (anchore#661)
  chore: add github token to quality tests (anchore#1056)
  chore: update yardstick to diagnose intermittent failures (anchore#1054)
  Update grype bootstrap tools to latest versions. (anchore#1048)
  fix: sort vulnerability results (anchore#1052)
  Adding internal/file/hasher test cases (anchore#1049)
  fix: orient by cve merging (anchore#1046)
  Update Syft to v0.64.0 (anchore#1047)
  fix: update removing results based on ownership-by-file-overlap (anchore#1045)
  feat: swap custom cyclone-dx model for cyclone-dx library (anchore#1038)
  chore: add GitLab Community Edition image to quality gate (anchore#1035)
  Update Syft to v0.63.0 (anchore#1037)
  fix: Exclude binary packages that have overlap by file ownership relationship (anchore#1024)
  docs: update quality gate docs (anchore#1032)
  ...
@kzantow kzantow deleted the fix/orient-by-cve-merging branch August 5, 2024 21:56
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