Skip to content

Commit

Permalink
pkg/cosign/kubernetes/webhook: remove unnecessary fmt.Sprintf
Browse files Browse the repository at this point in the history
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
  • Loading branch information
zchee committed May 16, 2022
1 parent 706b081 commit 3284ba9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cosign/kubernetes/webhook/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ func ValidatePolicySignaturesForAuthority(ctx context.Context, ref name.Referenc
// https://github.com/sigstore/cosign/issues/1652
sps, err := valid(ctx, ref, rekorClient, authority.Key.PublicKeys, remoteOpts...)
if err != nil {
return nil, fmt.Errorf(fmt.Sprintf("failed to validate public keys with authority %s for %s: %w", name, ref.Name()), err)
return nil, fmt.Errorf("failed to validate public keys with authority %s for %s: %w", name, ref.Name(), err)
} else if len(sps) > 0 {
logging.FromContext(ctx).Debugf("validated signature for %s with authority %s got %d signatures", ref.Name(), authority.Name, len(sps))
return ociSignatureToPolicySignature(ctx, sps), nil
Expand Down

0 comments on commit 3284ba9

Please sign in to comment.