Skip to main content

Verifying Releases

Every Idenplane image on Docker Hub (islamawad/idenplane) is built and pushed by one GitHub Actions workflow, docker-publish.yml. Nothing else holds the push credentials. The workflow also signs and attests each image, so you can check both of these yourself:

  • who built it: a keyless cosign signature. The signing certificate names the workflow file and the git tag it ran for, and the signature is recorded in the public Rekor transparency log.
  • what is inside: an SPDX SBOM, attached as a signed attestation. BuildKit also attaches its own SBOM and SLSA provenance (mode=max) to every platform image.

The examples use version 0.10.0. Replace it with the version you run.

What you need​

  • cosign 3.x. The commands were tested with 3.1.4. cosign 2.x cannot read the bundle format these signatures use.
  • docker buildx, which ships with Docker Desktop and Docker Engine 23 and later.
  • jq, for reading the SBOM.

You don't need a key: there is none to distribute. Your trust anchor is the identity in the certificate (the workflow and the tag), which Sigstore's public infrastructure vouches for.

1. Resolve the tag to a digest​

A tag can be moved and a digest can't. Verify the digest, then deploy that same digest.

VERSION=0.10.0
IMAGE=islamawad/idenplane
DIGEST=$(docker buildx imagetools inspect "$IMAGE:$VERSION" --format '{{json .Manifest}}' | jq -r .digest)
echo "$IMAGE@$DIGEST"

DIGEST is the digest of the multi-platform image index, and that index is what gets signed. The idenplane-0.10.0-image-digests.txt file attached to the GitHub release lists the same index digest, plus the digest of each platform image.

2. Verify the signature​

cosign verify "$IMAGE@$DIGEST" \
--certificate-identity "https://github.com/idenplane/idenplane/.github/workflows/docker-publish.yml@refs/tags/v$VERSION" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com

On success, cosign prints the verified payload as JSON and lists the checks it made: the claims were validated, the signature is in the transparency log, and the certificate was issued by Fulcio. On failure, it says why and exits non-zero. Don't deploy an image that fails this check.

The identity has to match exactly. It proves the image was signed by docker-publish.yml from the idenplane/idenplane repository, running for the tag v0.10.0, and not by a fork or another workflow.

From the first release after 0.10.1, :latest is the image of the latest release: the same digest as its version tag, signed with that release's identity, so the command above verifies it. Images built from main (:main-<sha>, and :latest up to 0.10.1) are signed with the identity …/docker-publish.yml@refs/heads/main. To accept either a release or main:

cosign verify "$IMAGE@$DIGEST" \
--certificate-identity-regexp '^https://github\.com/idenplane/idenplane/\.github/workflows/docker-publish\.yml@refs/(tags/v[0-9.]+|heads/main)$' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com

3. Verify and read the SBOM​

The SPDX SBOM is attached as a signed in-toto attestation. Verify it with the same identity, then extract it:

cosign verify-attestation "$IMAGE@$DIGEST" --type spdxjson \
--certificate-identity "https://github.com/idenplane/idenplane/.github/workflows/docker-publish.yml@refs/tags/v$VERSION" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
| head -n1 | jq -r '.payload // .dsseEnvelope.payload' | base64 -d | jq .predicate > idenplane-$VERSION.spdx.json

jq -r '.packages[] | "\(.name) \(.versionInfo)"' idenplane-$VERSION.spdx.json | sort | head

You can feed the file to a vulnerability scanner, for example grype sbom:idenplane-$VERSION.spdx.json. The SBOM is generated by syft from the linux/amd64 image as pushed.

4. Read the BuildKit SBOM and provenance​

BuildKit stores these next to each platform image in the index. They are not cosign-signed, but they come from the same build, and their digests are covered by the index digest you verified in step 2.

# SLSA provenance: source repository, commit, workflow, build arguments, base images
docker buildx imagetools inspect "$IMAGE@$DIGEST" --format '{{json .Provenance}}' | jq '."linux/amd64".SLSA'

# BuildKit's SPDX SBOM for one platform
docker buildx imagetools inspect "$IMAGE@$DIGEST" --format '{{json .SBOM}}' | jq '."linux/arm64".SPDX' > buildkit-arm64.spdx.json

To check that an image was built from the commit you expect, look at the provenance's invocation.configSource (SLSA 0.2) or buildDefinition.externalParameters (SLSA 1.0). Both carry the repository URL and the commit SHA.

5. Verify the release assets​

Each GitHub release carries four files, attached by release-assets.yml:

FileWhat it is
idenplane-X.Y.Z.spdx.jsonThe SBOM from step 3, taken from the signed attestation after verifying it
idenplane-X.Y.Z-image-digests.txtThe index digest and each platform's digest
SHA256SUMSChecksums of the two files above
SHA256SUMS.sigstore.jsonA keyless cosign bundle signing SHA256SUMS
gh release download "v$VERSION" -R idenplane/idenplane \
-p 'SHA256SUMS*' -p "idenplane-$VERSION*"

cosign verify-blob SHA256SUMS --bundle SHA256SUMS.sigstore.json \
--certificate-identity-regexp '^https://github\.com/idenplane/idenplane/\.github/workflows/release-assets\.yml@refs/' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com

sha256sum -c SHA256SUMS

cosign verify-blob prints Verified OK, and sha256sum -c prints OK for both files. The regular expression accepts any ref of release-assets.yml: it normally runs for the release's tag, but a maintainer can re-run it manually from a branch to backfill an older release.

Enforcing it in a cluster​

To refuse unsigned images in Kubernetes, use an admission controller that understands cosign keyless signatures, such as the Sigstore policy-controller or Kyverno. In either one, require the issuer https://token.actions.githubusercontent.com and the subject regular expression from step 2. Also pin the chart's image.tag to a digest (0.10.0@sha256:…) so that what runs is what you verified.

What this does and does not prove​

A valid signature proves the image was produced by the project's release workflow from the tagged source, and that it hasn't changed since. It doesn't prove that the source is free of vulnerabilities. For that, use the SBOM with a scanner, and read the security policy and the published advisories.

Images published before 0.10.0 are not signed.