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

Attaching the signature artifact to the Image artifact #3935

Open
wieringen opened this issue Nov 15, 2024 · 0 comments
Open

Attaching the signature artifact to the Image artifact #3935

wieringen opened this issue Nov 15, 2024 · 0 comments
Labels
question Further information is requested

Comments

@wieringen
Copy link

wieringen commented Nov 15, 2024

When I use oras (or gcloud artifacts attachments create) to attach an artifact to an image artifact, it's displayed in a parent/child relation in the UI of Google Cloud Artifact registry.

Screenshot 2024-11-15 at 15 35 16

When I use cosign this is not the case. The signature artifact is displayed like a normal artifact and no relationship is visible at first glance.

After comparing some of the manifests, I noticed that oras adds a field called subject to the manifest of the added artifact with a reference to the digest of the image artifact.
"subject": { "mediaType": "application/vnd.oci.image.index.v1+json", "digest": "sha256:the_digest_of_the_image", "size": 856 }

opencontainers/image-spec#1020
docker/build-push-action#1260

You can use the following command oras attach --artifact-type doc/example --annotation "key1=val1" --annotation "key2=val2" localhost:5000/hello:v1 to quickly create an attached artifact at that location.

Can cosign support the subject field as well?

@wieringen wieringen added the question Further information is requested label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant