Skip to content

Commit

Permalink
switch vuln check off LogFindings
Browse files Browse the repository at this point in the history
Signed-off-by: Spencer Schrock <[email protected]>
  • Loading branch information
spencerschrock committed Apr 9, 2024
1 parent b746068 commit 7c3403c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions checks/evaluation/vulnerabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ func Vulnerabilities(name string,
return checker.CreateRuntimeErrorResult(name, e)
}

vulnsFound := falseFindings(findings)
numVulnsFound := len(vulnsFound)
checker.LogFindings(vulnsFound, dl)
var numVulnsFound int
for i := range findings {
f := &findings[i]
// TODO(#3654), this needs to be swapped. But it's a complicated swap so doing it not in here.
if f.Outcome == finding.OutcomeFalse {
numVulnsFound++
checker.LogFinding(dl, f, checker.DetailWarn)
}
}

score := checker.MaxResultScore - numVulnsFound

Expand Down

0 comments on commit 7c3403c

Please sign in to comment.