Skip to content

Commit

Permalink
feat: create "trivy_vulerability_id" metric for each occurence (#1343)
Browse files Browse the repository at this point in the history
Currently the metric "trivy_vulerability_id" will only be created once
per image and CVE, even if the CVE occurs in multiple packages/libs.
  • Loading branch information
alexanderwoehler authored Jul 10, 2023
1 parent b1caf82 commit 4c8f373
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/metrics/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,6 @@ func (c ResourcesMetricsCollector) collectVulnerabilityIdReports(ctx context.Con
}
var vulnList = make(map[string]bool)
for _, vuln := range r.Report.Vulnerabilities {
if vulnList[vuln.VulnerabilityID] {
continue
}
vulnList[vuln.VulnerabilityID] = true
vulnLabelValues[9] = vuln.InstalledVersion
vulnLabelValues[10] = vuln.FixedVersion
Expand Down

0 comments on commit 4c8f373

Please sign in to comment.