-
Notifications
You must be signed in to change notification settings - Fork 575
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
Don't require CT log keys if using a key/sk #3415
Don't require CT log keys if using a key/sk #3415
Conversation
Fixes sigstore#3386. The logic was inverted for this check. Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3415 +/- ##
==========================================
+ Coverage 29.87% 30.38% +0.51%
==========================================
Files 155 155
Lines 9971 9971
==========================================
+ Hits 2979 3030 +51
+ Misses 6560 6490 -70
- Partials 432 451 +19 ☔ View full report in Codecov by Sentry. |
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.
lgtm
This code change has impacted BYO PKI case. So the problem is that even we are passing the flags like "--insecure-ignore-sct=true --insecure-ignore-tlog=true" still cosign is trying to fetch the ctlog public key for verification which we dont want to use. cosign verify harbor.demo-ncd.services.te0014-demo-ncd.dyn.nesc.net/ncd-orb/orbs/ncd-ncd_fp6_generic-799@sha256:c08f847db8877aeefa3852ae9ee471fa7c421be4089b855fd0e545d521e2d87c --certificate-identity-regexp='.' --certificate-oidc-issuer-regexp='.' --insecure-ignore-sct=true --insecure-ignore-tlog=true --cert-chain=rootCA.crt --verbose=true The same result, if I provide the rootCA.crt file as an env variable: export SIGSTORE_ROOT_FILE=/home/sanyi/cosign-2/rootCA.crt The code change done https://github.com/sigstore/cosign/blob/main/cmd/cosign/cli/verify/verify.go (209): goes into the section to get CT Log Key if IgnoreSCT is false or the keylessVerification function return True. I propose to enhance this check to also see if user is not passing any CertChain in verify command else we should not go for CTLog Public Key. |
Fixes #3386. The logic was inverted for this check.
Summary
Release Note
Documentation