Closed
Description
Inspired by sigstore/sigstore-python#155
cosign verify (in keyless mode) without any --cert-email provided will succeed when literally anybody has signed an image/blob. This is almost never the right behavior: evil@hacker.com can sign any blob you can.
Instead, we should require some verification policy:
--cert-email(and--cert-oidc-provider; see If--cert-emailis provided,--cert-oidc-providershould be required (verification) #1947)- a CUE policy
--insecure, which will do the current behavior today (possibly a hidden flag)
(Keyfull mode is okay, because you're passing the key material or CA in explicitly)