restic
restic copied to clipboard
docker: sign container images pushed to GHCR with GitHub OIDC tokens
What does this PR change? What problem does it solve?
- This allows users to verify the authenticity and integrity of Restic Docker images before using them.
- This provides users with a verifiable record of how, when and where an artifact was built.
Refer:
- https://github.blog/security/supply-chain-security/safeguard-container-signing-capability-actions/
- ~~https://github.com/sigstore/cosign-installer~~
- Generation of SLSA3+ provenance for container images
[Edit] Changes made to the GitHub Workflow:
- ~~installing cosign v2.4.0~~
- ~~add new step to sign all the images generated during the build and push step~~
- the id-token of the GitHub Actions workflow will be used for image signing
- replace branch-based tagging with SHA-based tagging since, branch names are mutable, SLSA provenance requires immutable tagging
- use official SLSA framework Github Reusable workflow [\Edit]
Was the change previously discussed in an issue or on the forum?
Closes #4983
Checklist
- [x] I have read the contribution guidelines.
- [x] I have enabled maintainer edits.
- [ ] I have added tests for all code changes.
- [x] I have added documentation for relevant changes (in the manual).
- [x] There's a new file in
changelog/unreleased/that describes the changes for our users (see template). - [x] I have run
gofmton the code in all commits. - [x] All commit messages are formatted in the same style as the other commits in the repo.
- [x] I'm done! This pull request is ready for review.
@MichaelEischer need some more time to test. facing some issue during the slsa verification.
@MichaelEischer the changes w.r.t the SLSA provenance is complete. I will update the documentation shortly.
@MichaelEischer I guess you can do a final review and merge this.
As for
I am not sure how the build-and-push steps work to upload to Dockerhub. Let me see if I can make this a generic solution which would work for any repository, not limited to Dockerhub and GHCR.
I will pick it up in a separate issue.