mirror of
https://github.com/anchore/syft.git
synced 2026-03-30 05:33:24 +02:00
* chore(deps): update tools to latest versions Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(lint): fix errors in new golangci-lint Two fixes: First, replace sb.WriteString(fmt.Sprintf(...)) with fmt.Fprintf(&sb, ...) Second, suppress errors where we read from the local file system at a user provided path. This is a CLI tool, and reads from user provided paths on the local file system by design. Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com> Co-authored-by: Will Murphy <willmurphyscode@users.noreply.github.com>
Syft API Examples
This directory contains examples of how to use the Syft API.
create_simple_sbom: Create a simple SBOM from scratchcreate_custom_sbom: Create an SBOM using as much custom configuration as possible, including a custom cataloger implementationdecode_sbom: Take an existing SBOM file (of arbitrary format) and decode it into a Syft SBOM objectsource_detection: Shows how to detect what to catalog automatically from a user string (e.g. container image vs directory)source_from_image: Construct a source from a only a container image
You can run any of these examples from this directory with:
go run ./DIRECTORY_NAME