Because a keyless signature only says that some identity signed the file. Without the certificate identity and OIDC issuer flags, you would be accepting a valid signature from anyone. Cosign 2.0 therefore requires both flags, and you should set them to the publisher you actually mean to trust.
What keyless signing records
With keyless signing there is no long lived key to guard. A short lived certificate ties the signature to an identity, such as a service account, and to the provider that vouched for it, called the issuer. The Kubernetes verification page shows what a real check looks like: it names the exact identity, krel-staging for binaries and the SBOM or krel-trust for images, and the issuer, https://accounts.google.com.
Pinning the identity
| Flag | Question it answers |
|---|---|
| certificate-identity | Who signed this? |
| certificate-oidc-issuer | Which provider vouched for that identity? |
If you checked only that a signature exists, an attacker could sign a malicious image with their own account and the check would pass. The identity pins the check to the publisher.
How to choose the values
- Read them from the publisher's own documentation, not from the artifact itself. The signature carries an identity, but you need to bring the expected one.
- Store them in your pipeline configuration as constants and review changes to them.
- Use one verification command per publisher. Do not share a loose regular expression across unrelated sources.
- If a publisher offers a pattern match, keep it as narrow as the documentation allows.
- Log the identity from each successful check, so unexpected changes show up in review.
A quick test of your setup
Try verifying a known image with a wrong identity on purpose. The command should fail. If it passes, your check is not pinning what you think it is.
Where this sits
A signature tells you who built it, not that it is safe. See what a container image signature proves and does not and Sigstore keyless verification: what to check.
Try it yourself
Try it yourself
Click through it at your own pace, or open it full screen. Notice that a gate needs a rule to compare against, just as a signature check needs an expected identity.
Quick check
Is a valid signature enough to deploy?
No. Check the identity, then scan the image for vulnerabilities and review its provenance.
Why did older cosign tutorials not need these flags?
The Kubernetes page notes older versions used an experimental environment variable. Cosign 2.0 requires the identity and issuer options.
Safeguard policies and gates let you define what must be true before a change ships, and a free scan is at https://gold.safeguard.sh/scan.
Sources
Last reviewed: 19 October 2026.