-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add subject
to attestation manifests
#5561
Comments
Can we do some cross-registry testing to understand what(if) common registries would return errors when pushing a manifest with subject. Otherwise we can add an opt-in for it. |
Yes I can look to have this in our e2e tests on build-push-action repo: https://github.com/docker/build-push-action/blob/master/.github/workflows/e2e.yml |
Tested here: https://github.com/docker/build-push-action/actions/runs/12182820627 Seems only Gitlab fails: https://github.com/docker/build-push-action/actions/runs/12182820627/job/33982750597#step:13:11
Tested also locally: FROM alpine
RUN echo hello
{
"schemaVersion":2,
"mediaType":"application/vnd.oci.image.index.v1+json",
"manifests":[
{
"mediaType":"application/vnd.oci.image.manifest.v1+json",
"size":667,
"digest":"sha256:d3f28426b6941bb3d874b09d95019f4316284732cb5c8688b57d8159a28e0836",
"platform":{
"architecture":"amd64",
"os":"linux"
}
},
{
"mediaType":"application/vnd.oci.image.manifest.v1+json",
"size":667,
"digest":"sha256:9985f0b4525d4369e8f702daa8b96016cf62b94f07f0897b54a12c08565c2008",
"platform":{
"architecture":"arm64",
"os":"linux"
}
},
{
"mediaType":"application/vnd.oci.image.manifest.v1+json",
"size":566,
"digest":"sha256:9b2bd7af0c3b6af640cea9cbd0998ade17afa04485810fa4720e40d466a68c8f",
"platform":{
"architecture":"unknown",
"os":"unknown"
},
"annotations":{
"vnd.docker.reference.digest":"sha256:d3f28426b6941bb3d874b09d95019f4316284732cb5c8688b57d8159a28e0836",
"vnd.docker.reference.type":"attestation-manifest"
}
},
{
"mediaType":"application/vnd.oci.image.manifest.v1+json",
"size":566,
"digest":"sha256:04c144745d07d8a41a292144c9239c76f71f3487d121100797fb6c023c6d1826",
"platform":{
"architecture":"unknown",
"os":"unknown"
},
"annotations":{
"vnd.docker.reference.digest":"sha256:9985f0b4525d4369e8f702daa8b96016cf62b94f07f0897b54a12c08565c2008",
"vnd.docker.reference.type":"attestation-manifest"
}
}
]
} Then attach an artifact with oras:
See "attached" manifest with subject attribute: https://explore.ggcr.dev/?image=crazymax%2Fbuildkit-5561%3Amulti%40sha256%3A712d3058686fa85a19077108e8a74affc44eee2c858144080f64b65e871fb57a {
"schemaVersion":2,
"mediaType":"application/vnd.oci.image.manifest.v1+json",
"artifactType":"doc/example",
"config":{
"mediaType":"application/vnd.oci.empty.v1+json",
"size":2,
"digest":"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"data":"e30="
},
"layers":[
{
"mediaType":"application/vnd.oci.image.layer.v1.tar",
"size":14,
"digest":"sha256:d9014c4624844aa5bac314773d6b689ad467fa4e1d1a50a1b8a99d5a95f72ff5",
"annotations":{
"org.opencontainers.image.title":"hi.txt"
}
}
],
"subject":{
"mediaType":"application/vnd.oci.image.index.v1+json",
"size":1607,
"digest":"sha256:166f78ab728dddc7f54a4cf12fdd37f604f4c1f12c521c0b78c29be6588752bf"
},
"annotations":{
"org.opencontainers.image.created":"2024-12-05T15:37:17Z"
}
} |
Bug on GitLab? oras-project/oras#1224 (comment) Other run with debug enabled: https://github.com/docker/build-push-action/actions/runs/12183567244/job/33985301861#step:13:1 |
Gitlab is known to not be OCI 1.1 conformant (they only support 1.0). They have an allow list for the config media type and block unknown values. |
relates to docker/build-push-action#1260
subject
has been added to the OCI spec 1.1.0: https://specs.opencontainers.org/image-spec/manifest/?v=v1.1.0#image-manifest-property-descriptions. This property specifies a descriptor of another manifest.Some registry providers like GAR use this property to link back to the original manifest. I think it would be fine to have this property attached to attestation manifests.
cc @wieringen @dvdksn @tianon
The text was updated successfully, but these errors were encountered: