Safeguard
Developer Tools•

What does cosign verify actually check, and what does it skip?

Cosign verify checks a signature, a digest match and, with the right flags, a signer identity. What passes, what you must add, and the flags to avoid.

Safeguard Security Team
3 min read

Cosign verify checks that a valid signature exists for the image, that the signed payload digest matches the container, and, if you supply an identity or a key, that the signer is who you expect. It does not decide whether the image is safe or whether your policy is met.

The three layers of a check

LayerWhat is checkedNeeds you to supply
SignatureA signature exists and verifies against a key or certificateA key or keyless trust roots
DigestThe digest in the signed payload matches the containerNothing, it is the default
IdentityThe certificate identity and OIDC issuer matchBoth identity and issuer values

The cosign docs say that by default cosign validates the digest matches the container during verify. They also describe a flag that turns off claim checking and advise using it only for non cosign payload formats. Leave it alone otherwise.

Identity is the part people skip

For keyless signatures the docs show verification with both an expected identity and an issuer:

cosign verify <image URI> \
  --certificate-identity=name@example.com \
  --certificate-oidc-issuer=https://accounts.example.com

Common issuers listed in the docs include Google, Microsoft, GitHub and GitLab. If you skip these, you learn that someone signed, and anyone with an account can sign. The identity check is what turns a signature into a statement about your publisher.

For key based signing, verify with the public key file, or a KMS reference. To avoid a KMS call at verification time, export the public key first.

Attestations

The verify attestation command checks attestations attached to an image. Payloads use the DSSE spec and decode to an in-toto Statement. Cosign can also validate the predicate against a policy file written in CUE or Rego. The docs add that systems should fail closed rather than open.

What it does not check

  • Whether the image has vulnerabilities.
  • Whether the signer is trustworthy beyond the identity you named.
  • Whether the tag you typed points where you think. Verify a digest reference.
  • Whether your organisation's policy, such as required provenance level, is met. That needs a policy step.

A solid verification step for a pipeline

  1. Resolve the tag to a digest.
  2. Run verify with identity and issuer, or the public key.
  3. Run verify attestation for provenance and check the predicate type and fields.
  4. Fail the deploy on any non zero exit.
  5. Log the digest and the identity that verified.

Where Safeguard fits

Safeguard's policy gates can enforce deployment rules, and image scanning covers vulnerabilities, which verify does not.

Try it yourself

Click through it at your own pace, or open it full screen.

Scan an image in the demo to see the content findings that a signature check will never show.

Quick check

Does a passing cosign verify mean the image is clean?

No. It means the signature and digest checks passed, plus identity if you supplied it. Scan the contents separately.

Should I ever turn off claim checking?

Only for payload formats that are not produced by cosign, as the docs advise.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.