{"tool":"syft","name":"Syft","description":"Generates a software bill of materials (SBOM) from container images and filesystems in SPDX, CycloneDX and other formats.","tags":["SBOM","containers","supply chain"],"homepage":"https://github.com/anchore/syft","docs":"https://github.com/anchore/syft/wiki","install":{"brew":"brew install syft","other":"curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin"},"related":["grype","trivy"],"total_commands":17,"commands":[{"id":1,"category":"Generating SBOMs","command":"syft <image>","example":"syft nginx:1.27","explanation":"Lists every package found in an image as a table."},{"id":3,"category":"Generating SBOMs","command":"syft dir:<path>","example":"syft dir:.","explanation":"Catalogues a directory — lock files, manifests and binaries."},{"id":11,"category":"Generating SBOMs","command":"syft file:<path>","example":"syft file:./app.jar","explanation":"Catalogues a single file such as a JAR or binary."},{"id":12,"category":"Generating SBOMs","command":"syft docker-archive:<file>","example":"syft docker-archive:image.tar","explanation":"Reads an image saved with docker save."},{"id":13,"category":"Generating SBOMs","command":"syft registry:<image>","example":"syft registry:ghcr.io/org/app:latest","explanation":"Pulls straight from a registry without a Docker daemon."},{"id":6,"category":"Generating SBOMs","command":"syft <image> --scope all-layers","example":"syft app:latest --scope all-layers","explanation":"Includes packages from every layer, even ones deleted later."},{"id":14,"category":"Generating SBOMs","command":"syft <image> --exclude <glob>","example":"syft dir:. --exclude './node_modules/**'","explanation":"Skips paths you do not want catalogued."},{"id":2,"category":"Formats","command":"syft <image> -o spdx-json","example":"syft app:latest -o spdx-json > sbom.spdx.json","explanation":"SPDX JSON, a widely accepted SBOM standard."},{"id":15,"category":"Formats","command":"syft <image> -o cyclonedx-json","example":"syft app:latest -o cyclonedx-json > sbom.cdx.json","explanation":"CycloneDX JSON, preferred by many security platforms."},{"id":16,"category":"Formats","command":"syft <image> -o syft-json","example":"syft app:latest -o syft-json > sbom.json","explanation":"Syft’s own lossless format with the most detail."},{"id":17,"category":"Formats","command":"syft <image> -o table -o spdx-json=<file>","example":"syft app:latest -o table -o spdx-json=sbom.json","explanation":"Writes several formats in one run."},{"id":18,"category":"Formats","command":"syft convert <sbom> -o <format>","example":"syft convert sbom.json -o cyclonedx-json","explanation":"Converts an existing SBOM between formats."},{"id":19,"category":"Inspecting","command":"syft <image> -o json | jq '.artifacts[] | {name, version, type}'","example":"syft alpine -o json | jq '.artifacts[] | {name, version, type}'","explanation":"Extracts package names, versions and ecosystems with jq."},{"id":20,"category":"Inspecting","command":"syft <image> --select-catalogers <name>","example":"syft dir:. --select-catalogers python","explanation":"Runs only particular catalogers, such as Python or Java."},{"id":21,"category":"Inspecting","command":"syft cataloger list","example":"syft cataloger list","explanation":"Lists all available catalogers."},{"id":22,"category":"Attestation","command":"syft attest --output spdx-json <image>","example":"syft attest --output spdx-json ghcr.io/org/app:1.0","explanation":"Generates an SBOM and signs it as an in-toto attestation with cosign."},{"id":23,"category":"Attestation","command":"syft <image> -o spdx-json | grype","example":"syft <image> -o spdx-json | grype","explanation":"Pipes the SBOM straight into Grype for vulnerability matching."}],"slug":"syft","category":"containers","url":"https://terminal.rokibulroni.com/tool/containers/syft","markdown":"https://terminal.rokibulroni.com/api/v1/tools/containers/syft.md"}