feat(detector, contrib/trivy-to-vuls): collect vendor severity and cvss (#1921)

This commit is contained in:
MaineK00n
2024-05-17 19:11:51 +09:00
committed by GitHub
parent e4728e3881
commit 878c25bf5a
6 changed files with 800 additions and 28 deletions

View File

@@ -945,10 +945,13 @@ func detailLines() (string, error) {
refsMap[ref.Link] = ref
}
}
if conts, found := vinfo.CveContents[models.Trivy]; found {
for _, cont := range conts {
for _, ref := range cont.References {
refsMap[ref.Link] = ref
for _, ctype := range models.GetCveContentTypes(string(models.Trivy)) {
if conts, found := vinfo.CveContents[ctype]; found {
for _, cont := range conts {
for _, ref := range cont.References {
refsMap[ref.Link] = ref
}
}
}
}