Skip to content

Commit

Permalink
check policies (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrompflopes authored and igorlombacx committed Oct 20, 2023
1 parent 12ba812 commit 73fabcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/commands/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ func runCreateScanCommand(

cleanUpTempZip(zipFilePath)
// verify break build from policy
if len(policyResponseModel.Polices) > 0 && policyResponseModel.BreakBuild {
if policyResponseModel != nil && len(policyResponseModel.Polices) > 0 && policyResponseModel.BreakBuild {
logger.PrintIfVerbose("Breaking the build due to policy violation")
return errors.Errorf("Policy Violation - Break Build Enabled. To bypass the policy evaluation and continue with the build, you can use the `--ignore-policy` flag.")
}
Expand Down

0 comments on commit 73fabcf

Please sign in to comment.