Skip to content

Commit cefe5e2

Browse files
committed
fail build even if vuln was provided
1 parent dd7069a commit cefe5e2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

commands/scan/scan.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,8 @@ func (scanCmd *ScanCommand) RunAndRecordResults(cmdType utils.CommandType, recor
269269
if err = cmdResults.GetErrors(); err != nil {
270270
return
271271
}
272-
// If includeVulnerabilities is false it means that context was provided, so we need to check for build violations.
273272
// If user provided --fail=false, don't fail the build.
274-
if scanCmd.fail && !scanCmd.resultsContext.IncludeVulnerabilities {
273+
if scanCmd.fail {
275274
if results.CheckIfFailBuild(cmdResults.GetScaScansXrayResults()) {
276275
return results.NewFailBuildError()
277276
}

0 commit comments

Comments
 (0)