diff --git a/checks/evaluation/sast.go b/checks/evaluation/sast.go index ff4ac30c698..a5650a72e52 100644 --- a/checks/evaluation/sast.go +++ b/checks/evaluation/sast.go @@ -72,6 +72,9 @@ func SAST(name string, if sonarScore == checker.MaxResultScore { return checker.CreateMaxScoreResult(name, "SAST tool detected") } + if snykScore == checker.MaxResultScore { + return checker.CreateMaxScoreResult(name, "SAST tool detected: Snyk") + } if sastScore == checker.InconclusiveResultScore && codeQlScore == checker.InconclusiveResultScore { @@ -79,11 +82,6 @@ func SAST(name string, // retun checker.InconclusiveResultScore. return checker.CreateRuntimeErrorResult(name, sce.ErrScorecardInternal) } - if snykScore != checker.InconclusiveResultScore { - if snykScore == checker.MaxResultScore { - return checker.CreateMaxScoreResult(name, "SAST tool detected: Snyk") - } - } // Both scores are conclusive. // We assume the CodeQl config uses a cron and is not enabled as pre-submit.