Projects STRLCPY grype Commits 78dc2d9b
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    cmd/root.go
    skipped 352 lines
    353 353   
    354 354   applyDistroHint(packages, &pkgContext, appConfig)
    355 355   
    356  - // TODO: add summary logging for matches... e.g.
    357  - // [0000] DEBUG found 12 vulnerabilities for 10 package
    358  - // ├── fixed: 3
    359  - // ├── ignored: 5
    360  - // └── matched: 12
    361  - // ├── low: 4
    362  - // └── high: 8
    363 356   vulnMatcher := grype.VulnerabilityMatcher{
    364 357   Store: *str,
    365 358   IgnoreRules: appConfig.Ignore,
    skipped 151 lines
  • ■ ■ ■ ■ ■ ■
    grype/matcher/matchers.go
    skipped 190 lines
    191 191   vulnerabilitiesList.Critical.SetCompleted()
    192 192   vulnerabilitiesList.Fixed.SetCompleted()
    193 193   
     194 + logListSummary(vulnerabilitiesList, vulnerabilitiesDiscovered.N, len(packages))
     195 + 
    194 196   // Filter out matches based off of the records in the exclusion table in the database or from the old hard-coded rules
    195 197   res = match.ApplyExplicitIgnoreRules(store, res)
    196 198   
    197 199   return res
     200 +}
     201 + 
     202 +func logListSummary(vl *vulnerabilitiesList, vulnerabilitiesDiscovered int64, packages int) {
     203 + log.Debugf("found %d vulnerabilities for %d packages", vulnerabilitiesDiscovered, packages)
     204 + log.Debugf(" ├── fixed: %d", vl.Fixed.N)
     205 + log.Debugf(" ├── ignored: %d", vl.Unknown.N)
     206 + log.Debugf(" └── matched: %d", vulnerabilitiesDiscovered)
     207 + log.Debugf(" ├── unknown: %d", vl.Unknown.N)
     208 + log.Debugf(" ├── low: %d", vl.Low.N)
     209 + log.Debugf(" ├── medium: %d", vl.Medium.N)
     210 + log.Debugf(" ├── high: %d", vl.High.N)
     211 + log.Debugf(" └── critical: %d", vl.Critical.N)
    198 212  }
    199 213   
    200 214  func updateVulnerabilityList(list *vulnerabilitiesList, matches []match.Match, metadataProvider vulnerability.MetadataProvider) {
    skipped 39 lines
Please wait...
Page is in error, reload to recover