Full platform remediation #7
@@ -123,6 +123,7 @@ def test_scanner_images_are_versioned_and_digest_pinned() -> None:
|
||||
assert 'docker save "$IMAGE_ID"' in sbom
|
||||
assert '"docker-archive:$WORKDIR/$IMAGE_ARCHIVE"' in sbom
|
||||
assert 'SYFT_PARALLELISM=${SYFT_PARALLELISM:-1}' in sbom
|
||||
assert "--select-catalogers=-binary" in sbom
|
||||
assert '--volumes-from "$HOSTNAME"' in sbom
|
||||
assert 'ARCHIVE_ID_FILE="${IMAGE_ARCHIVE}.image-id"' in sbom
|
||||
assert "/var/run/docker.sock" not in sbom
|
||||
|
||||
@@ -57,6 +57,10 @@ if [[ -n "${HOSTNAME:-}" ]] && docker inspect --type container "$HOSTNAME" >/dev
|
||||
WORKSPACE_ARGS=(--volumes-from "$HOSTNAME")
|
||||
fi
|
||||
|
||||
# CUDA and PyTorch ship several gigabytes of native binaries. Syft's heuristic
|
||||
# binary catalogers exceed the isolated runner's 8 GiB limit on that content.
|
||||
# Authoritative dpkg, Python, npm and other installed-package catalogers remain
|
||||
# enabled; Trivy still scans the complete immutable archive independently.
|
||||
docker run --rm \
|
||||
--user 0:0 \
|
||||
-e "SYFT_PARALLELISM=${SYFT_PARALLELISM:-1}" \
|
||||
@@ -64,6 +68,7 @@ docker run --rm \
|
||||
-w "$WORKDIR" \
|
||||
"$SYFT_IMAGE" \
|
||||
"docker-archive:$WORKDIR/$IMAGE_ARCHIVE" \
|
||||
--select-catalogers=-binary \
|
||||
-o "spdx-json=$OUTPUT"
|
||||
|
||||
test -s "$ROOT/$OUTPUT"
|
||||
|
||||
Reference in New Issue
Block a user