-
Notifications
You must be signed in to change notification settings - Fork 25
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(e2e): provenance registry option for container generator #294
feat(e2e): provenance registry option for container generator #294
Conversation
I noticed that the existing slsa-verifier / workflow takes @laurentsimon Let me know if this is not enough. Does Slsa-verifier download / login to a set |
Can we add a last step to delete the image from the registry?
ah, good catch. slsa-verifier does not handle login by itself. It relies on the user being already logged in. If you've added login for the new provenance registry, it should work, I think. |
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.
LGTM, thanks. Let's add a step to delete image from docker registry and we should be ready to merge. You'll probably need a new job and use if: always()
to make sure it always runs
I will work on deleting the image from dockerhub given that the token has enough permissions.
Additional login added at: https://github.com/slsa-framework/example-package/pull/294/files#diff-6708d79be59bf41aad1275aefcad526256652e711589b301e093c6e0cc7ae10eR144. |
I'm not sure we really care about deleting the image. None of our other tests really rely on the image being deleted and tests should work ok since we run checks by sha rather than any registry tags. I suppose we're talking about deleting the image contents and not the ghcr 'package' outright? |
Also, just a note. For the test to work we'll need to set up a package with the image name in the |
My main reason for deleting was that I don't know how docker registry handles blobs, in the sense whether they have size limits or not. If we know that will never be a problem, I'm fine not deleting |
@saisatishkarra I can merge this PR and you can send a folow-up to delete the image (depending on @ianlewis 's question why I asked to delete). Wdut? |
mhh, I did not know that. Could not find an option to setup a new package... |
@laurentsimon After some digging seems like docker is deprecating the Advanced Image management API and hub-tool (experimental) doesn't yet support providing password from env / doesn't obey docker login creds, and is pending. Here are the 3 issues for deleting from docker hub: docker/roadmap#534 Option 1: Push container image to GHCR and provenance image to dockerhub (i.e. Swap token permissions and registries for storing image and provenance). Leverage https://github.com/marketplace/actions/delete-ghcr-io-package-tag to delete docker container image from GHCR and leave out provenance in a docker registry Option 2: Push container image to dockerhub and provenance to GHCR. Skip deletion/pruning of images and document reasons. Clarifications needed:
|
Let me know what direction to take and if the package has been created? |
Let me create the package. It's kind of silly but you have to push an empty image using your own token to get it to create the package and only then can you give the repo permission to push... This shouldn't stop us from merging. The test will just fail initially but that's probably fine. We don't need it to delete the image. We can handle deletion later if we need to. We would need to address it in our other tests separately anyway. |
OK, I created the package and set the settings so that example-package has write access. That should allow the test to push to ghcr. |
@laurentsimon / @ianlewis I fixed a few linting issues and modified the config for golangci and yamllint when running locally. Can someone rerun this workflow and fix any other issues for which files aren't changed in this PR to save some back-and-forth iterations? |
As a external contributor, i am getting a 404 when clicking the package link (Hoping it was created and exists). Pls make sure to run any workflow / permissions issue to move this forward. |
Ah, right. I forgot that these packages were set as private. I think we made these private since they are only used to make tests work and we don't want folks don't try to download and use them or something. You shouldn't need access to yourself. The repo just needs access so it should be fine. This repo is a bit funky since it's not easy to fork it and test but you can leave it to us to fix any small test bugs that might crop up after merge. re: linters: These haven't been fully passing so it's somewhat normal that they aren't passing right now. We need to do a bit of cleanup but haven't had a chance yet. |
cc: @laurentsimon Fixes Issue #2981