Skip to content

Commit

Permalink
Add way to specify extra SBOM scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Oct 9, 2024
1 parent ad50445 commit a9d5dfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .test/meta-commands/out.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ SOURCE_DATE_EPOCH=1709081058 \
--load=false \
--provenance=false \
--build-arg BUILDKIT_DOCKERFILE_CHECK=skip=all \
--sbom=generator="$BASHBREW_BUILDKIT_SBOM_GENERATOR" \
--sbom="generator=$BASHBREW_BUILDKIT_SBOM_GENERATOR","EXTRA_SCANNERS=$BASHBREW_BUILDKIT_EXTRA_SCANNERS" \
--output 'type=oci,tar=false,dest=sbom' \
--platform 'linux/amd64' \
--build-context "fake=oci-layout://$PWD/temp@$originalImageManifest" \
Expand Down
4 changes: 2 additions & 2 deletions meta.jq
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def build_command:
"docker buildx build --progress=plain",
"--provenance=mode=max",
if build_should_sbom then
"--sbom=generator=\"$BASHBREW_BUILDKIT_SBOM_GENERATOR\""
"--sbom=\"generator=$BASHBREW_BUILDKIT_SBOM_GENERATOR\",\"EXTRA_SCANNERS=$BASHBREW_BUILDKIT_EXTRA_SCANNERS"
else empty end,
"--output " + (
[
Expand Down Expand Up @@ -328,7 +328,7 @@ def build_command:
"docker buildx build --progress=plain",
"--load=false", "--provenance=false", # explicitly disable a few features we want to avoid
"--build-arg BUILDKIT_DOCKERFILE_CHECK=skip=all", # disable linting (https://github.com/moby/buildkit/pull/4962)
"--sbom=generator=\"$BASHBREW_BUILDKIT_SBOM_GENERATOR\"",
"--sbom=\"generator=$BASHBREW_BUILDKIT_SBOM_GENERATOR\",\"EXTRA_SCANNERS=$BASHBREW_BUILDKIT_EXTRA_SCANNERS",
"--output 'type=oci,tar=false,dest=sbom'",
# TODO also add appropriate "--tag" lines (which would give us a mostly correct "subject" block in the generated SBOM, but we'd then need to replace instances of ${sbomImageManifest#*:} with ${originalImageManifest#*:} for their values to be correct)
@sh "--platform \(.source.arches[.build.arch].platformString)",
Expand Down

0 comments on commit a9d5dfd

Please sign in to comment.