-
Notifications
You must be signed in to change notification settings - Fork 5
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
operating on attestation bundles not supported #13
Comments
Let me make a fix for that. Attestation support is needed. |
Are you trying to delete the image by "tag" and then the associated attestation? I think the action should check for attestation tags and delete these as if they are part of image being deleted if they are present. Your sample shows deleting the attestation directly by tag. Was that just a test? Or are you wanting to cleanup the full image with the attestation also? |
Well... ideally the action does not even care about the type of artifact it is operating on. The attestations are somehow special, as there are two "options" regarding how they are made discoverable in the OCI registry(legacy, OCI v2). At least for the OCI v2 version, no special handling should be required. OCI registry v2
OCI registry v1 Unfortunately, the github
This was just a test to see if the action can operate on non-container artifacts. |
I've added initial support for referrers/attestation 4cc714f on main. I've added two attestation tests, it likely needs a few more. Additionally, in the validate mode, i search for orphaned referrer tags. The cleanup action should probably treat them as "untagged" and delete them in the "untagged" cleanup modes. Strangely, ghcr.io returned a 404 for the referrers API for the digest, so I'm not sure it's implementing that api yet, I couldn't find any docs. So currently it looks for a v1 tag approach. Not sure if it makes sense to call the api for a 404 and then fall back to the tag approach (which the spec defines). |
Many thanks. I re-tested it here and it works like charms.
That's indeed strange, as the |
That's great news. |
The output of your jobs also appears it treated some of the referrer tags as "untagged". Im not sure that is correct. |
Actually I think the code is finding orphaned referrer tags automatically!!!! Treating them as untagged as they aren't "in use". I should probably print out info message also in that case. |
I verified the regctl also get's 404 on the referrers api, it's using the tag approach to find the referrers manifest on ghcr.io |
You're right. The same was just confirmed on actions/attest-build-provenance#91 as well:
Anyways, many thanks for the investigation and this action in general! |
thanks for your feature request and testing! |
The github provenance attestations (e.g. from the attest-build-provenance action) are uploaded to the container registry as well (following the Cosign bundle specification). The attestation manifests are tagged as
sha256-<digest>
, whereby the digest refers to the container the attestation belongs to.These attestation manifests have no
platform
set, which makes the cleanup action fail.Inspect this tag:
regctl manifest get --format raw-body ghcr.io/siemens/kas/kas:sha256-84d0ca4f9a5975c7fe229bb08c2340be1a4f8a1b7fcd65b0a43f3ea93589942f | jq
The text was updated successfully, but these errors were encountered: