Skip to content

Commit

Permalink
Add logging of passed step if found during policy failure (#454)
Browse files Browse the repository at this point in the history
Signed-off-by: John Kjell <[email protected]>
  • Loading branch information
jkjell authored Jun 13, 2024
1 parent 54e8d18 commit f5f2ae6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ func runVerify(ctx context.Context, vo options.VerifyOptions, verifiers ...crypt
log.Error("Evidence:")
for step, result := range verifiedEvidence.StepResults {
log.Error("Step: ", step)
if len(result.Passed) > 0 {
log.Infof("Passed with evidence: %s", result.Passed[0].Reference)
continue
}
for _, p := range result.Rejected {
if p.Collection.Collection.Name != "" {
log.Errorf("collection rejected: %s, Reason: %s ", p.Collection.Collection.Name, p.Reason)
Expand Down

0 comments on commit f5f2ae6

Please sign in to comment.