-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor policy related code, add support for vuln verify #1747
Conversation
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@@ -122,7 +121,7 @@ func (c *VerifyAttestationCommand) Exec(ctx context.Context, images []string) (e | |||
return errors.Wrap(err, "loading certificate from reference") | |||
} | |||
if c.CertChain == "" { | |||
co.SigVerifier, err = signature.LoadVerifier(cert.PublicKey, crypto.SHA256) | |||
co.SigVerifier, err = signature.LoadECDSAVerifier(cert.PublicKey.(*ecdsa.PublicKey), crypto.SHA256) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, this seems a regression, as we will want to support ECDS and non ECDSA keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh snaps, that must have been a bad rebase, Thanks for catching this!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added in #1740
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun fact, I wanted to take a crack at actually combining these and verify.go flag handling as they are identical (see the name of my branch LOL ), but then went off the rails and did this instead. But I'll try to get to it :)
fi | ||
echo '::endgroup::' | ||
|
||
- name: Verify custom attestation with cosign, fails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
) * Refactor policy related code, add support for vuln verify Signed-off-by: Ville Aikas <vaikas@chainguard.dev> * Thanks @hectorj2f for catching a bad upstream rebase. Signed-off-by: Ville Aikas <vaikas@chainguard.dev> * Fix typo. Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas vaikas@chainguard.dev
Summary
Ticket Link
Fixes
Release Note