Use the provided devcontainer to start working with SBOMs and Vulnerability scanners.
Set the following environment variables for use within each tool
# The image to work with
IMAGE=nginx
# The root folder for the results output
RESULTS_FOLDER=results
syft $IMAGE -o spdx-json --file "${RESULTS_FOLDER}"/"$(echo syft_${IMAGE}.json | sed 's/://g;s/\///g;s/@//g')"
export DeleteManifestDirIfPresent=true
sbom-tool generate -di $IMAGE \
-b $RESULTS_FOLDER \
-bc . \
-pn package-name \
-ps package-supplier \
-nsb https://example.com \
-pv 1
grype $IMAGE -o sarif --file "${RESULTS_FOLDER}"/"$(echo grype_${IMAGE}.json | sed 's/://g;s/\///g;s/@//g')"
trivy image $IMAGE -f sarif -o "${RESULTS_FOLDER}"/"$(echo trivy_${IMAGE}.json | sed 's/://g;s/\///g;s/@//g')"
./generate-all.sh "nginx,busybox" true true true true results