syft/examples
Keith Zantow f9e09aef19
docs: add simplest example from regsitry (#2691)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2024-03-06 14:25:37 -05:00
..
create_custom_sbom feat: add --from flag, refactor source providers (#2610) 2024-02-27 16:44:37 -05:00
create_simple_sbom feat: add --from flag, refactor source providers (#2610) 2024-02-27 16:44:37 -05:00
decode_sbom Add API examples (#2517) 2024-02-02 16:26:44 +00:00
select_catalogers feat: add --from flag, refactor source providers (#2610) 2024-02-27 16:44:37 -05:00
source_detection feat: add --from flag, refactor source providers (#2610) 2024-02-27 16:44:37 -05:00
source_from_image feat: add --from flag, refactor source providers (#2610) 2024-02-27 16:44:37 -05:00
source_from_registry docs: add simplest example from regsitry (#2691) 2024-03-06 14:25:37 -05:00
README.md Add API examples (#2517) 2024-02-02 16:26:44 +00:00

Syft API Examples

This directory contains examples of how to use the Syft API.

  • create_simple_sbom: Create a simple SBOM from scratch
  • create_custom_sbom: Create an SBOM using as much custom configuration as possible, including a custom cataloger implementation
  • decode_sbom: Take an existing SBOM file (of arbitrary format) and decode it into a Syft SBOM object
  • source_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