feat(images): sign, SBOM, and attest provenance for Docker Hub publishes - #539
Merged
Conversation
Extends the publish-dockerhub job in publish-images.yml to match the ghcr.io publish job's supply-chain guarantees: - cosign keyless-sign the pushed digest - generate and attest a CycloneDX SBOM - write and attest an SLSA provenance predicate - self-verify the signature after signing Adds id-token: write permission and the cosign-installer step needed for keyless signing. Updates docs/image-signing.md to document Docker Hub alongside GHCR (naming/tagging differences, shared trust identity), and adds workflow-structure test coverage in tests/test_publish_images_workflow.py mirroring the existing ghcr.io assertions. Resolves #275 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SemTiOne
approved these changes
Aug 27, 2026
SemTiOne
left a comment
Collaborator
There was a problem hiding this comment.
Good work. However there are some minor suggestions (see below).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
RonaldHensbergen
force-pushed
the
fix/dockerhub-sign-sbom-provenance-275
branch
from
August 27, 2026 10:12
d27f49a to
9073cb8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #275: the
publish-dockerhubjob inpublish-images.ymlonly built, vulnerability-gated, and pushed images — it had none of the supply-chain guarantees (cosign sign, SBOM attestation, SLSA provenance attestation) that thepublish(ghcr.io) job already has.id-token: writepermission and acosign-installerstep topublish-dockerhub.docker inspect --format='{{index .RepoDigests 0}}'), mirroring the ghcr.io job.cosign sign --yes, CycloneDX SBOM generation +cosign attest, an SLSA provenance predicate +cosign attest, and acosign verifyself-check — same steps as thepublishjob, same keyless OIDC identity (same workflow file/branch).docs/image-signing.md: documents Docker Hub naming/tagging alongside GHCR, and clarifies both registries share the same trust identity (OIDC issuer + certificate identity), since both jobs run from this workflow.tests/test_publish_images_workflow.py: new assertions for thepublish-dockerhubjob mirroring the existingpublishjob checks (id-token permission, cosign-installer step, digest-based signing/attestation, SBOM+provenance both attested, gate runs before sign/push).Out of scope
tests/fixtures/signed-images.jsonremains GHCR-only (unchanged) — it's used for offlinecds security --verify-imagesverification against the images this project references by default (ghcr.io/...), not a general publish-audit log for every registry.Testing
python -m unittest discover -s tests -p "test_*.py" -v— 567 tests, all passmake lint— passespython3 -c "import yaml; yaml.safe_load(open('.github/workflows/publish-images.yml'))"— valid YAML