talos/hack/sbom.sh
Andrey Smirnov c079119337
chore: refactor how tools are being installed
Move stuff into `tools/go.mod`.

Also fix linting issues on the way (updating golangci-lint).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-14 17:45:39 +04:00

11 lines
305 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
SYFT_FORMAT_PRETTY=1 SYFT_FORMAT_SPDX_JSON_DETERMINISTIC_UUID=1 \
go tool \
github.com/anchore/syft/cmd/syft \
scan --from dir "$1" \
--select-catalogers "+sbom-cataloger,go" \
--source-name "$NAME" --source-version "$TAG" \
-o spdx-json > "/rootfs/usr/share/spdx/$2"