Skip to content

ci: sign the image with cosign (keyless)#51

Merged
thejefflarson merged 1 commit into
mainfrom
sign-image
Jun 10, 2026
Merged

ci: sign the image with cosign (keyless)#51
thejefflarson merged 1 commit into
mainfrom
sign-image

Conversation

@thejefflarson

Copy link
Copy Markdown
Owner

Signs each pushed watcher-server image with keyless cosign.

What it does

  • Signs by immutable digest (not tag) right after build/push.
  • Keyless — the job's GitHub OIDC token is exchanged for a short-lived Fulcio cert and the signature is recorded in the Rekor transparency log. No private key to generate, store, or rotate.
  • Adds id-token: write, the sigstore/cosign-installer step, and reuses the existing GHCR docker login to push the signature.

Verify a signed image

cosign verify ghcr.io/thejefflarson/watcher-server@<digest> \
  --certificate-identity-regexp 'https://github.com/thejefflarson/watcher/\.github/workflows/ci\.yml@.*' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Watch on first run

The signing step needs egress from the self-hosted watcher-runners to Sigstore (fulcio.sigstore.dev, rekor.sigstore.dev) + the cosign release download. The runners already reach GHCR/registries, so this should be fine — but it's the thing to confirm on the first main build.

🤖 Generated with Claude Code

Sign each pushed image by digest using keyless cosign — GitHub's OIDC token is
exchanged for a short-lived Fulcio cert and the signature is recorded in Rekor,
so there's no private key to manage. Adds id-token: write, installs cosign, and
signs ghcr.io/<owner>/watcher-server@<digest> reusing the existing GHCR login.

Verify with:
  cosign verify ghcr.io/thejefflarson/watcher-server@<digest> \
    --certificate-identity-regexp 'https://github.com/thejefflarson/watcher/\.github/workflows/ci\.yml@.*' \
    --certificate-oidc-issuer https://token.actions.githubusercontent.com

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thejefflarson thejefflarson merged commit 4b2451c into main Jun 10, 2026
5 checks passed
@thejefflarson thejefflarson deleted the sign-image branch June 10, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant