Skip to content

Commit

Permalink
fix(report): set severity in Red Hat OVAL to both CVSS v3 and v2 #1146
Browse files Browse the repository at this point in the history
  • Loading branch information
kotakanbe committed Jan 25, 2021
1 parent 3c1489e commit 4f77fb5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions oval/redhat.go
Expand Up @@ -173,17 +173,15 @@ func (o RedHatBase) convertToModel(cveID string, def *ovalmodels.Definition) *mo
score2, vec2 := o.parseCvss2(cve.Cvss2)
score3, vec3 := o.parseCvss3(cve.Cvss3)

severity := def.Advisory.Severity
sev2, sev3, severity := "", "", def.Advisory.Severity
if cve.Impact != "" {
severity = cve.Impact
}

sev2, sev3 := "", ""
if score2 == 0 {
sev2 = severity
}
if score3 == 0 {
if severity != "None" {
sev3 = severity
if score2 != 0 {
sev2 = severity
}
}

// CWE-ID in RedHat OVAL may have multiple cweIDs separated by space
Expand Down

0 comments on commit 4f77fb5

Please sign in to comment.