Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify source code with cosign #1136

Closed
kpcyrd opened this issue May 24, 2024 · 2 comments
Closed

Verify source code with cosign #1136

kpcyrd opened this issue May 24, 2024 · 2 comments

Comments

@kpcyrd
Copy link

kpcyrd commented May 24, 2024

Hello!

cosign was brought up in the Arch Linux packaging channel and I was wondering if apko could be a good example package to document how to integrate cosign into a PKGBUILD.

Specifically, after downloading the source code from this url:

https://github.com/chainguard-dev/apko/archive/refs/tags/v0.14.1.tar.gz

How would I use cosign to authenticate this source code? Do I need to access a git object instead?

I noticed there are .sig and .crt files attached to the release, but they are all architecture specific (and same for the content of checksums.txt).

Input very welcome, thanks! :)

@krishjainx
Copy link

We have some good docs here: https://edu.chainguard.dev/open-source/sigstore/cosign/how-to-verify-file-signatures-with-cosign/

~ on ☁️  krish.jain@chainguard.dev 
❯ cosign verify-blob \
  --signature https://github.com/chainguard-dev/apko/releases/download/v0.14.7/apko_0.14.7_linux_amd64.tar.gz.sig \
  --certificate https://github.com/chainguard-dev/apko/releases/download/v0.14.7/apko_0.14.7_linux_amd64.tar.gz.crt \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
  --certificate-identity "https://github.com/chainguard-dev/apko/.github/workflows/release.yaml@refs/tags/v0.14.7" \
  https://github.com/chainguard-dev/apko/releases/download/v0.14.7/apko_0.14.7_linux_amd64.tar.gz
Verified OK

If you encounter any issues related to architecture-specific signatures and certificates, make sure that you are using the correct set of files for your specific architecture.

Feel free to reach out if this is still a problem.

@xnox
Copy link
Contributor

xnox commented Jun 13, 2024

https://github.com/chainguard-dev/apko/archive/refs/tags/v0.14.1.tar.gz is an automatically (on the fly) generated export tarball by github of the git tag.

It is not an artifact uploaded by our release workflows that signs binary artifacts using cosign.

Some commits and tags are at times signed with gitsign / cosign, however many commits are signed with ssh/gpg signatures instead.

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

No branches or pull requests

3 participants