Chainguard images are signed keylessly with Sigstore (Fulcio certificates, Rekor transparency log). Verify a signature by checking the certificate identity and its OIDC issuer. You need cosign and jq installed.
Public images (cgr.dev/chainguard/*)
cosign verify \ --certificate-oidc-issuer=https://token.actions.githubusercontent.com \ --certificate-identity=https://github.com/chainguard-images/images/.github/workflows/release.yaml@refs/heads/main \ cgr.dev/chainguard/<image> | jq
Private / dedicated-registry images
Images in your organization's registry are signed by your organization's CATALOG_SYNCER (catalog images) or APKO_BUILDER (org-customized images) identity. Retrieve those identity UIDPs, then verify against them:
CATALOG_SYNCER=$(chainctl iam account-associations describe $PARENT -o json | jq -r '.[].chainguard.service_bindings.CATALOG_SYNCER')
APKO_BUILDER=$(chainctl iam account-associations describe $PARENT -o json | jq -r '.[].chainguard.service_bindings.APKO_BUILDER')
cosign verify \
--certificate-oidc-issuer=https://issuer.enforce.dev \
--certificate-identity-regexp="https://issuer.enforce.dev/(${CATALOG_SYNCER}|${APKO_BUILDER})" \
cgr.dev/${PARENT}/<image> | jq(The two UIDP values are also available in the Chainguard Console under Settings.) Scope the identity to these two rather than a broad wildcard so verification asserts the image was signed by your organization's expected identities.
Comments
0 comments
Article is closed for comments.