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 VulnerabilityReport totalUniquePackages #300

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

matheusfm
Copy link
Contributor

Description

This PR fixes the count of unique packages in VulnerabilityReport.

The package libc6 at version 2.36-9+deb12u4 in the example below is counted twice because has different status for each CVE (fixed vs affected).

The expected behavior is to be counted as the same package. Note that it’s a vulnerability report of one image.

    id: CVE-2024-33600
    packages:
    - fixVersion: 2.36-9+deb12u7
      package: libc6
      status: fixed
      type: debian
      version: 2.36-9+deb12u4
---
    id: CVE-2019-1010023
    packages:
    - package: libc6
      status: affected
      type: debian
      version: 2.36-9+deb12u4

Linked Issues

UD-1592

How has this been tested?

  • Install Zora in a cluster with vulnerability scan enabled, and check the field totalUniquePackages of VulnerabilityReports

Checklist

  • I have labeled this PR with the relevant Type labels
  • I have documented my code (if applicable)
  • My changes are covered by tests

@matheusfm matheusfm added the bug 🐛 Something isn't working label Jun 18, 2024
@matheusfm matheusfm requested a review from knrc June 18, 2024 23:05
@matheusfm matheusfm self-assigned this Jun 18, 2024
@matheusfm matheusfm merged commit 40ffd51 into main Jun 19, 2024
3 of 4 checks passed
@matheusfm matheusfm deleted the UD-1592-fix-total-unique-packages branch June 19, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants