feat: sign checksums and containers with cosign #372
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.
Refs https://www.sigstore.dev, https://docs.sigstore.dev.
This makes use of cosign's identity-based/keyless mode: https://docs.sigstore.dev/cosign/signing/overview/
I have an example of this in action in my fork (which I've cut down to just the related parts to build and publish)
checksums.txt-keyless.*): https://github.com/scop/upcloud-cli/releases/tag/v0.0.0sha256-*.sig): https://github.com/scop/upcloud-cli/pkgs/container/upcloud-clidocker pull ghcr.io/.../upcloud-cli:sha256-*.sig). That isn't ideal, but I don't know if it's that much of a concern. I wonder if there's a way to mark some of the images as the default from which this would be generated?To try and verify the blobs and images in my fork above with cosign, tweak the project and release in the docs recipe accordingly.
Details
project_url=https://github.com/scop/upcloud-cli release=v0.0.0 cosign verify-blob \ --certificate-identity ${project_url}/.github/workflows/publish.yml@refs/tags/${release} \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --certificate ${project_url}/releases/download/${release}/checksums.txt-keyless.pem \ --signature ${project_url}/releases/download/${release}/checksums.txt-keyless.sig \ ${project_url}/releases/download/${release}/checksums.txtOnce/if we have a future release out with these changes, I'll send a PR over to aqua-registry to make use of the signatures. After that is out with aqua and mise, installing with them will automatically verify the signatures and we can add a note to our docs about it (assuming we've merged #371 meanwhile).