Generating a SBOM on custom made images or ftp trees
This document (000021347) is provided subject to the disclaimer at the end of this document.
Environment
Situation
For customers building their own images using kiwi or similar tooling, it is occasionally needed to create a SBOM.
Currently it is not yet integrated into kiwi, but SUSE's tooling can be used for the purpose of creating SBOMs.
Resolution
Install the "build" package from SUSE, available in SUSE Linux Enterprise Module Development Tools module, openSUSE Leap or Tumbleweed repositories.
The build tool sources is available via https://github.com/openSUSE/obs-build
Running the tool
After installing the "build" package, you can use the "/usr/lib/build/generate_sbom" tool included in the package.
Primary options for the tool are:
--distro "sbom distroname"
The name your distribution or build should present in the SBOM.
--format spdx / --format cyclonedx
The format of the SBOM, you can select either SPDX or CycloneDX format.
If you want to generate both, call the script twice with different format options.
--intoto
Optional, the SBOM data is encapsulated in in-toto attestation format.
The tool can fetch data from several sources to generate SBOM data:
--dir DIRECTORY
Points to a installed system below DIRECTORY, using its RPM Database for SBOM extraction.
--product DIRECTORY
Looks for all RPMs files in a directory tree below DIRECTORY and extracts SBOM information from them.
--rpmmd DIRECTORY
Uses a RPM-MD style DIRECTORY (e.g. an update or product repository).
CONTAINER.tar
Extracts SBOM data from the specified OCI CONTAINER.tar file.
The SBOM file will be output to stdout.
Note that the tool generally works by using RPM meta information at this time. The SUSE RPMs are correctly tagged for this, for third parties it needs to be ensured that these have correct license, URL and other tags.
The tool currently does not go deeper than the RPM level.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021347
- Creation Date: 05-Feb-2024
- Modified Date:05-Feb-2024
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com