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

Also sign images with Cosign #12

Merged
merged 3 commits into from
Oct 19, 2024
Merged

Also sign images with Cosign #12

merged 3 commits into from
Oct 19, 2024

Conversation

samhclark
Copy link
Owner

@samhclark samhclark commented Oct 19, 2024

So, I decided that I wanted to pair GitHub Attestations with Cosign signatures anyway.

The threat model is kinda weird though.

With just Attestations, if someone took over and replaced the repo with the same one, same name, then they could still push images and make attestations for that image. It's just proving that the repo named "samhclark/custom-silverblue" built the images. So if they could like, rename my account. Or delete my account and takeover the namespace.

With just the Cosign signing, if the keys were exfiltrated somehow, and an attacker got upload access to GHCR, then they could sign and upload malicious images.

So, doing both together means that I can verify:

  • the image was built by a repo named samhclark/custom-silverblue
  • the image is was signed by a key that only the current samhclark/custom-silverblue repo has access to

It's a little flimsy. I'm not totally sure that both were necessary. But, I'm also using this as an excuse to practice with cosign and attestations a little so it's not a big deal.

@samhclark samhclark merged commit 6000b30 into main Oct 19, 2024
2 checks passed
@samhclark samhclark deleted the okay-this-time-for-real branch October 19, 2024 03:43
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.

1 participant