Search

Chapter 3. Creating a software bill of materials manifest file

download PDF

Red Hat Trusted Profile Analyzer can analyze both CycloneDX and Software Package Data Exchange (SPDX) SBOM formats by using the JSON file format. Many open source tools are available to you for creating Software Bill of Materials (SBOM) manifest files from container images, or for your application. For this procedure we are going to use the Syft tool.

Important

Currently, Trusted Profile Analyzer only supports CycloneDX version 1.3, 1.4 and SPDX version 2.2.

Prerequisites

Procedure

  1. To create an SBOM by using a container image.

    CycloneDX format:

    Syntax

    syft IMAGE_PATH -o cyclonedx-json@1.4

    Example

    $ syft registry:example.io/hello-world:latest -o cyclonedx-json@1.4

    SPDX format:

    Syntax

    syft IMAGE_PATH -o spdx-json@2.2

    Example

    $ syft registry:example.io/hello-world:latest -o spdx-json@2.2

    Note

    Syft supports many types of container image sources. See the official supported source list on Syft’s GitHub site.

  2. To create an SBOM by scanning the local file system.

    CycloneDX format:

    Syntax

    syft dir: DIRECTORY_PATH -o cyclonedx-json@1.4
    syft file: FILE_PATH -o cyclonedx-json@1.4

    Example

    $ syft dir:. -o cyclonedx-json@1.4
    $ syft file:/example-binary -o cyclonedx-json@1.4

    SPDX format:

    Syntax

    syft dir: DIRECTORY_PATH -o spdx-json@2.2
    syft file: FILE_PATH -o spdx-json@2.2

    Example

    $ syft dir:. -o spdx-json@2.2
    $ syft file:/example-binary -o spdx-json@2.2

Additional resources

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.