Skip to content

Commit 947fc7d

Browse files
authored
chore: enable OCI artifact type for attestation manifests (#199)
BuildKit's default image exporter does not set `artifactType` or the OCI 1.1 Referrers `subject` backlink on attestation manifests. Setting `oci-artifact=true` on the image exporter adds both, so SBOM and provenance attestations become discoverable through the OCI Referrers API. `oci-mediatypes=true` is redundant (BuildKit already defaults it to true when pushing to a registry, which is why the top-level index is already `application/vnd.oci.image.index.v1+json`) but kept for clarity. Same fix as cloudnative-pg/cloudnative-pg#10601, mirroring cloudnative-pg/postgres-containers#436. Closes #198 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
1 parent 7cec00c commit 947fc7d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

docker-bake.hcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ target "default" {
5959
BASE = "${getBaseImage(distro, pgVersion)}"
6060
}
6161

62+
output = [
63+
"type=image,oci-mediatypes=true,oci-artifact=true",
64+
]
6265
attest = [
6366
"type=provenance,mode=max",
6467
"type=sbom"

0 commit comments

Comments
 (0)