Skip to content

Commit

Permalink
Merge pull request #55 from ContainerSolutions/fix/exit-error
Browse files Browse the repository at this point in the history
removing return condition on failed validation
  • Loading branch information
gusfcarvalho authored Jul 17, 2023
2 parents 97d699c + 45b4762 commit 13134b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: deploy-image
on:
push:
branches:
- main
workflow_dispatch: {}
jobs:
deploy:
name: Release
Expand Down
3 changes: 1 addition & 2 deletions operator/internal/provider/checkov/checkov.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (c *Client) Attest() (argusiov1alpha1.AttestationResult, error) {
RunAt: v1.Now(),
Reason: fmt.Sprintf("could not get source repo for '%v'", c.RepoUrl),
}
return res, nil
return res, err
}

checkov_cmd := exec.Command("checkov", "-d", clone_location, "--check", c.Checks, "-o", "cli")
Expand All @@ -55,7 +55,6 @@ func (c *Client) Attest() (argusiov1alpha1.AttestationResult, error) {
res.Result = argusiov1alpha1.AttestationResultTypeUnknown
res.Err = err.Error()
res.Reason = "checkov execution returned error"
return res, err
}
if checkov_cmd.ProcessState.ExitCode() != 0 {
res.Result = argusiov1alpha1.AttestationResultTypeFail
Expand Down

0 comments on commit 13134b2

Please sign in to comment.