Skip to content

Commit 148faa7

Browse files
Merge pull request #7 from williamlin-suse/main
NVSHAS-8085: scan result is affected if custom root-of-trust keyless …
2 parents 80eb6ee + f123655 commit 148faa7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func main() {
8181

8282
allSatisfiedVerifiers := []string{}
8383
for _, rootOfTrust := range config.RootsOfTrust {
84-
fmt.Printf("checking root of trust: %s\n", rootOfTrust.Name)
84+
fmt.Printf("\n>>>> checking root of trust: %s\n", rootOfTrust.Name)
8585
satisfiedVerifiers, err := verify(imageDigestHash, rootOfTrust, signatures)
8686
if err != nil {
8787
// line with prefix "ERROR: " is recognized by scanner for error encounted when verifying against a verifier
@@ -134,7 +134,9 @@ func verify(imgDigest v1.Hash, rootOfTrust RootOfTrust, sigs []oci.Signature) (s
134134
return satisfiedVerifiers, fmt.Errorf("could not set root of trust %s cosign check options: %s", rootOfTrust.Name, err.Error())
135135
}
136136
for _, verifier := range rootOfTrust.Verifiers {
137-
fmt.Printf("checking verifier %s\n", verifier.Name)
137+
cosignOptions.SigVerifier = nil
138+
cosignOptions.Identities = nil
139+
fmt.Printf(">> checking verifier %s\n", verifier.Name)
138140
err = setVerifierCosignOptions(&cosignOptions, verifier, rootOfTrust, ctx)
139141
if err != nil {
140142
fmt.Printf("ERROR: %s\n", err.Error())

0 commit comments

Comments
 (0)