-
Notifications
You must be signed in to change notification settings - Fork 565
ggcr: descriptors in ImageIndex returned by referrers API do not fulfill requirements stated in OCI spec #1997
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
Labels
Comments
#1931 is an open PR that fixes the |
nmiyake
added a commit
to nmiyake/go-containerregistry
that referenced
this issue
Aug 13, 2024
Implement the behavior described by the OCI 1.1 specification at https://github.com./opencontainers/distribution-spec/blob/main/spec.md#listing-referrers for annotations for descriptors in the ImageIndex returned by the referrers API. Addresses google#1997
#1998 is a PR to fix the |
nmiyake
added a commit
to nmiyake/go-containerregistry
that referenced
this issue
Aug 13, 2024
Implement the behavior described by the OCI 1.1 specification at https://github.com./opencontainers/distribution-spec/blob/main/spec.md#listing-referrers for annotations for descriptors in the ImageIndex returned by the referrers API. Addresses google#1997
This issue is stale because it has been open for 90 days with no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The OCI 1.1 specification for the "referrers" API states that, for the descriptors in the returned referrers index,
The descriptors MUST include an artifactType field that is set to the value of the artifactType in the image manifest or index, if present
andThe descriptors MUST include annotations from the image manifest or index.
.However, the current
go-containerregistry
library does not fulfill either of these requirements.To Reproduce
For annotations:
v1.Image
with a non-emptyannotations
field andsubject
field and useremote.Write
to write the imageremote.Referrers
on the subject and examine the manifest entryannotations
fieldFor
artifactType
:v1.Image
that specifies a value for theartifactType
field (can be done by including this field in the output of theRawManifest()
implementation ofv1.Image
) andsubject
field and useremote.Write
to write the imageremote.Referrers
on the subject and examine the manifest entryartifactType
field of the descriptor for the image from step 1 is set to the value ofConfig.MediaType
Expected behavior
For annotations:
annotations
field that matches theannotations
field of the imageFor
artifactType
:artifactType
value that matches thearitfactType
field of the imageAdditional context
Full text of the referrers specification:
GitHub has implemented an action that uses the referrers API to upload referrers using subjects, and it looks like their implementation properly does this (sets annotations and artifact types for referrer ImageIndex): actions/attest-build-provenance#73 (comment)
The text was updated successfully, but these errors were encountered: