Skip to content

Commit

Permalink
sast: adjust snyk to be the same with sonar
Browse files Browse the repository at this point in the history
Signed-off-by: David Korczynski <[email protected]>
  • Loading branch information
DavidKorczynski committed Dec 13, 2023
1 parent 3f06176 commit 5789512
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions checks/evaluation/sast.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,16 @@ 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 {
// That can never happen since sastToolInCheckRuns can never
// 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.
Expand Down

0 comments on commit 5789512

Please sign in to comment.