Metrics Not Grouping Properly When Some Reports Are Missing Package Path #2229
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and will be auto-closed.
What steps did you take and what happened:
In relation to this pull request concerning grouping, I discovered that some VulnerabilityReports lack a Package Path. For example, when I scanned
external-dns/external-dns:v0.12.0
, there were two instances of CVE-2022-2097—one forresource: libcrypto1.1
and one for
resource: libssl1.1
From the VulnerabilityReport, both of them lack a Package Path. I'm not sure, but it might be related to this comment.
This is causing our metrics to be grouped into a single metric, even though they correspond to different resources.
This also causes the metrics between
trivy_image_vulnerabilities
andtrivy_vulnerability_id
to not match up.What did you expect to happen:
I expect these two reports to be separate metrics, not grouped into a single metric, because they have different resource fields.
Anything else you would like to add:
maybe we can include
vuln.Resource
invulnKey
mapEnvironment:
trivy-operator version
): 0.22.0kubectl version
): v1.28.7-gke.1026001The text was updated successfully, but these errors were encountered: