Sign image by digest cosign
Sign by immutable digest, not tag; note: signing a tag is racy and insecure
cosign sign --key cosign.key <host>/<name>@sha256:<id>
more cosign
all 5 commands →
Keyless sign via OIDC
COSIGN_EXPERIMENTAL=1 cosign sign <host>/<name>@sha256:<id>
Verify keyless signature
cosign verify --certificate-identity=<id> --certificate-oidc-issuer=<host> <host>/<name> | jq .
Attest CycloneDX SBOM
cosign attest --key cosign.key --predicate sbom.json --type cyclonedx <host>/<name>@sha256:<id>
Verify attestation by type
cosign verify-attestation --key cosign.pub --type cyclonedx <host>/<name> | jq -r '.payload' | base64 -d | jq .