Skip to content

Commit 8937e38

Browse files
Specify the builder id for provenance
1 parent 72d39b3 commit 8937e38

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.test/meta-commands/out.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# <build>
66
SOURCE_DATE_EPOCH=1700741054 \
77
docker buildx build --progress=plain \
8-
--provenance=mode=max \
8+
--provenance=mode=max,builder-id='https://github.com/docker-library' \
99
--output '"type=oci","dest=temp.tar"' \
1010
--annotation 'org.opencontainers.image.source=https://github.com/docker-library/docker.git#6d541d27b5dd12639e5a33a675ebca04d3837d74:24/cli' \
1111
--annotation 'org.opencontainers.image.revision=6d541d27b5dd12639e5a33a675ebca04d3837d74' \

doi.jq

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ def _sbom_subset:
157157
]
158158
;
159159

160+
# https://github.com/docker-library/meta-scripts/pull/61 (for lack of better documentation for setting this in buildkit)
161+
# https://slsa.dev/provenance/v0.2#builder.id
162+
def buildkit_provenance_builder_id:
163+
"https://github.com/docker-library"
164+
;
165+
160166
# input: "build" object (with "buildId" top level key)
161167
# output: boolean
162168
def build_should_sbom:

meta.jq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def build_command:
139139
@sh "SOURCE_DATE_EPOCH=\(.source.entry.SOURCE_DATE_EPOCH)",
140140
# TODO EXPERIMENTAL_BUILDKIT_SOURCE_POLICY=<(jq ...)
141141
"docker buildx build --progress=plain",
142-
"--provenance=mode=max",
142+
@sh "--provenance=mode=max,builder-id=\(buildkit_provenance_builder_id)",
143143
if build_should_sbom then
144144
# see "bashbrew remote arches docker/scout-sbom-indexer:1" (we need the SBOM scanner to be runnable on the host architecture)
145145
# bashbrew remote arches --json docker/scout-sbom-indexer:1 | jq '.arches | keys_unsorted' -c

0 commit comments

Comments
 (0)