Sign keyless with OIDC

Sign with Fulcio and Rekor using your OIDC identity; in cosign v2 this is the default.

COSIGN_EXPERIMENTAL=1 cosign sign <host>/<name>@sha256:<id>

tool
cosign5 commands
tags
cosignsecurityciobservability

More cosign commands

  • cosign verify --certificate-identity=<id> --certificate-oidc-issuer=<host> <host>/<name> | jq .

    Verify a keyless signature; always set both the signer identity and the OIDC issuer.

  • cosign attest --key cosign.key --predicate sbom.json --type cyclonedx <host>/<name>@sha256:<id>

    Attach a signed CycloneDX SBOM attestation to an image digest.

  • cosign verify-attestation --key cosign.pub --type cyclonedx <host>/<name> | jq -r '.payload' | base64 -d | jq .

    Verify the attestation, then decode the in-toto payload to read the predicate.

  • cosign sign --key cosign.key <host>/<name>@sha256:<id>

    Sign the immutable digest, not a tag; a tag can move between push and signing, so signing it is unsafe.

all 5 cosign commands