Skip to content

feat(release): cosign-sign published docker images#139

Open
mvanhorn wants to merge 1 commit intoInfisical:mainfrom
mvanhorn:feat/108-cosign-docker-images
Open

feat(release): cosign-sign published docker images#139
mvanhorn wants to merge 1 commit intoInfisical:mainfrom
mvanhorn:feat/108-cosign-docker-images

Conversation

@mvanhorn
Copy link
Copy Markdown

Summary

Adds a docker_signs block to .goreleaser.yml so each released Docker image (and the multi-arch manifest list) gets a keyless cosign signature, using the same OIDC trust chain already wired up for checksums.txt. Updates the release footer with a cosign verify example for users.

Refs #108 (item 9). Per the maintainer's reply on that issue: "it'd be great if you could raise separate PRs for 8, 9, and 10."

Why this matters

Per #108:

docker_signs block in .goreleaser.yml — cosign is already installed in the release workflow; it's currently only used to sign checksums.txt.

The release workflow (.github/workflows/release.yml) already installs cosign and grants id-token: write for keyless signing, so this change reuses the existing trust chain — no new permissions, no new infra. Pulled images can be verified before they execute, which closes the same class of supply-chain risk the existing checksum signing closes for binary archives.

Changes

.goreleaser.yml:

  • New docker_signs: block with artifacts: all (signs both per-arch images and the manifest list) using cosign sign --yes ${artifact}@${digest}. Same shape as the existing signs: block to keep the file consistent.
  • Release footer adds a cosign verify example for infisical/agent-vault:{{ .Version }}, mirroring the existing cosign verify-blob example.

Testing

  • goreleaser check: 1 configuration file(s) validated. (Pre-existing deprecation notices about dockers_v2 are unrelated to this PR.)
  • YAML parse confirms docker_signs registers correctly: {cmd: cosign, artifacts: all, args: [sign, --yes, ${artifact}@${digest}]}.

End-to-end signing can only be exercised via a real tag push (on: push: tags: v*). Suggest cutting an RC tag (e.g. v0.13.1-rc1) on a branch to confirm signatures publish correctly before the next prod release.

Order with #8 and #10

Item 8 (attest-build-provenance) is in #138; this is item 9 (independent of #138, can land in either order). Item 10 (install.sh cosign + checksum verify) is best landed after #138 so it can prefer gh attestation verify.

Fixes #108

This contribution was developed with AI assistance.

Adds a docker_signs block to .goreleaser.yml so each released image
gets a keyless cosign signature (same OIDC trust chain as the existing
checksum signing). Updates the release footer with the cosign verify
command for users.

Refs Infisical#108 (item 9)
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

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.

Supply-chain hardening shortlist. Would any of these PRs be welcome?

1 participant