From 7c3403c41e9f8f79846acb40bf427689507a1fa5 Mon Sep 17 00:00:00 2001 From: Spencer Schrock Date: Tue, 9 Apr 2024 09:15:17 -0700 Subject: [PATCH] switch vuln check off LogFindings Signed-off-by: Spencer Schrock --- checks/evaluation/vulnerabilities.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/checks/evaluation/vulnerabilities.go b/checks/evaluation/vulnerabilities.go index fc5e1e60283..4c37e23f36f 100644 --- a/checks/evaluation/vulnerabilities.go +++ b/checks/evaluation/vulnerabilities.go @@ -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