-
Notifications
You must be signed in to change notification settings - Fork 218
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
feat(cd): sign released container images and Helm chart #160
Conversation
@hainenber thanks for picking this up, I'll give this a thorough review ASAP. One initial question - I noticed in the GH sample workflow they don't have any explicit keys. I think this is because they are using OIDC integration to do "keyless" signing? This seems preferable since we wouldn't need to manage GPG keys as secrets. Do you think that's something we can do here? |
Sure, I think it's feasible if GH decided to demonstrate their sample workflow as such. Will tinker around a bit |
0195776
to
a1784eb
Compare
All relevant container images and Helm chart are now signed with I decide to make it into a build artifact so release engineers can bundle (no pun, I swear) into a release if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks! Left some feedback based on my testing
I did some experimenting with this and I couldn't quite get it to work: https://github.com/rbtr/retina/actions/runs/8474428281 Ran in to a few problems:
Overall I think this is very close with the changes suggested earlier, if we can figure out a solution to the digest problem. For acceptance criteria I would love to see a published signed image (and be able to verify it with cosign) to demonstrate that this functions 🙂 |
Thanks for your effort on testing out the changes on your forked repo! My apologies for having this under the radar as I tend to disable GH actions in my forked repos to cut CI costs Re: 1st point, I'm trying to store image digest with this Onto the 2nd point, from Onto the lab, hopefully a short round this time. To save up your effort to other Retina's more pressuring issues, I'll convert this one to Draft and will seek your reviews once it deems as worthy. |
Happy to collab on this, no problem at all. This is an important feature to me 🙂 |
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: Evan Baker <rbtr@users.noreply.github.com> Signed-off-by: Đỗ Trọng Hải <41283691+hainenber@users.noreply.github.com>
e366233
to
06ceea0
Compare
Signed-off-by: hainenber <dotronghai96@gmail.com>
06ceea0
to
bbd14e2
Compare
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
hi @rbtr, I've fixed the signing for released images, charts and manifest. These are the successful actions in my forked repo ![]() You can verify the artifacts via ![]() |
thanks @hainenber! I will test this out 🙂 |
Signed-off-by: hainenber <dotronghai96@gmail.com>
Please do! Bon apetit :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some nit comments, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally LGTM! This is great, thanks @hainenber 🍻
Aside from anyone else's comments, my last ask would be to updated the README and docs.
I'm thinking we add a block such as:
### Verify signed images
Retina images published to GHCR are cryptographically signed. You can verify their provenance with [`sigstore/cosign`](https://github.com/sigstore/cosign):
```shell
REPO=microsoft/retina # or your repo
IMAGE=retina-operator # or other image to verify
TAG=v0.0.6 # or other tag to verify OR replace with the image SHA256
cosign verify ghcr.io/$REPO/$IMAGE:$TAG --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp="https://github.com/$REPO" -o text
```
to the README, and duplicate it to a site page such as docs/installation/verify-signed-images.md
so that it's on retina.sh also 🙂
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
@rbtr I've addressed Quang's comments and added relevant documentation as suggested by you. I think yours is already succinct so pardon me for a whole copy-paste :D |
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hainenber I committed newlines at the end of your markdown files to make the linter happy, everything else LGTM
# Description Sign released container images with Cosign and Helm chart with `helm package --sign` ## Related Issue If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request. Closes #141 ## Checklist - [x] I have read the [contributing documantation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`) - [x] I have correctly attributed the author(s) of the code. - [ ] I have tested the changes locally. - [ ] I have followed the project's style guidelines. - [ ] I have updated the documentation, if necessary. - [ ] I have added tests, if applicable. ## Screenshots (if applicable) N/A ## Additional Notes In order for testing this change, please create a GPG private key and a Cosign private key and deposit as GH secrets for this repo --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project. --------- Signed-off-by: hainenber <dotronghai96@gmail.com> Signed-off-by: Đỗ Trọng Hải <41283691+hainenber@users.noreply.github.com> Signed-off-by: Evan Baker <rbtr@users.noreply.github.com> Co-authored-by: Evan Baker <rbtr@users.noreply.github.com>
Description
Sign released container images with Cosign and Helm chart with
helm package --sign
Related Issue
If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.
Closes #141
Checklist
git commit -S -s ...
)Screenshots (if applicable)
N/A
Additional Notes
In order for testing this change, please create a GPG private key and a Cosign private key and deposit as GH secrets for this repo
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.