mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 23:26:39 -08:00
fix(vulnerability): make an empty severity UNKNOWN (#759)
This commit is contained in:
@@ -106,6 +106,11 @@ func (c Client) getVendorSeverity(vuln *types.DetectedVulnerability, source stri
|
||||
if vs, ok := vuln.VendorSeverity[vulnerability.Nvd]; ok {
|
||||
return vs.String(), vulnerability.Nvd
|
||||
}
|
||||
|
||||
if vuln.Severity == "" {
|
||||
return dbTypes.SeverityUnknown.String(), ""
|
||||
}
|
||||
|
||||
return vuln.Severity, ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user