From f5f2ae60df7efbb13857054000933cb0ae568aa2 Mon Sep 17 00:00:00 2001 From: John Kjell Date: Thu, 13 Jun 2024 16:38:54 -0500 Subject: [PATCH] Add logging of passed step if found during policy failure (#454) Signed-off-by: John Kjell --- cmd/verify.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/verify.go b/cmd/verify.go index 720f0d1b..b12d3fc6 100644 --- a/cmd/verify.go +++ b/cmd/verify.go @@ -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)