Create a software bill of materials from the direct dependencies of a Buildroot generated project
Project description
CycloneDX Buildroot
This python application generates CycloneDX Software Bill of Materials (SBOM) containing all direct dependencies of a Buildroot generated project. It also supports projects that provide a comma-separated-values (.csv) file as a manifest of the software bill of materials. Thus an embedded project or any other project that has a CSV file containing the column information below, can be used with this project.
PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES
OWASP CycloneDX is a full-stack Bill of Materials (BOM) standard that provides advanced supply chain capabilities for cyber risk reduction. Buildroot provides a build target named "legal-info" which produces a set of files including manifest.csv. The legal-info is a general "make" target for a Buildroot project. Additionally and optionally Buildroot supports a "make" target named "show-info" to produce CPE data for your build.
Requirements
python >= 3.8
Installation
Install this from Python Package Index (PyPI) using your preferred Python package manager.
install via one of commands:
python -m pip install CycloneDX-Buildroot # install via pip
pipx install CycloneDX-Buildroot # install via pipx
poetry add CycloneDX-Buildroot # install via poetry
uv tool install CycloneDX-Buildroot # install via uv
# ... you get the hang
Usage
Call via one of commands:
cyclonedx-buildroot # call script
python -m cyclonedx_buildroot # call python module CLI
Help page
$ cyclonedx-buildroot --help
usage: cyclonedx-buildroot [-h] [-i INPUT_FILE] [-o OUTPUT_FILE] [-n PRODUCT_NAME] [-v PRODUCT_VERSION] [-m MANUFACTURER_NAME] [-c CPE_INPUT_FILE]
CycloneDX BOM Generator
options:
-h, --help show this help message and exit
-i INPUT_FILE comma separated value (csv) file of buildroot manifest data
-o OUTPUT_FILE SBOM output file name for json and xml
-n PRODUCT_NAME name of the product
-v PRODUCT_VERSION product version string
-m MANUFACTURER_NAME name of product manufacturer
-c CPE_INPUT_FILE cpe file from make show-info
Example
By default, manifest.csv will be read from the current working directory
and the resulting bom.json will also be created in the current working directory.
This can be overwritten as follows:
cyclonedx-buildroot -i <path>/manifest.csv -n "My Project" -v "1.2.3.4" -m "your manufacturing company name" -c cpe.json
Integration
Diagram depicting where this project fits into the pipeline of secure development activities. Note that while the diagram depicts a linear sequence of activities, the entire sequence is typically cyclical. The end state of SBOM management receives the SBOM files for the product versions to properly manage the state of vulnerabilities over time.
CycloneDX Schema Support
The following table provides information on the version of this module, the CycloneDX schema version supported, as well as the output format options. Use the latest possible version of this module that is compatible with the CycloneDX version supported by the target system.
| Version | Schema Version | Format(s) |
|---|---|---|
| 2.0 | CycloneDX v1.6 | XML/JSON |
Internals
This tool utilizes the CycloneDX Python library to generate the actual data structures, and serialize and validate them.
This tool does not expose any additional public API or symbols - all code is intended to be internal and might change without any notice during version upgrades.
However, the CLI is stable - you might call it programmatically, like so:
from sys import executable
from subprocess import run
run((executable, '-m', 'cyclonedx_buildroot', '--help'))
Copyright & License
CycloneDX Buildroot is Copyright (c) OWASP Foundation. All Rights Reserved.
Permission to modify and redistribute is granted under the terms of the Apache 2.0 license. See the LICENSE file for the full license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyclonedx_buildroot-2.0.0.tar.gz.
File metadata
- Download URL: cyclonedx_buildroot-2.0.0.tar.gz
- Upload date:
- Size: 51.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0786aa7c7e7607db7133186b480a1c1165fdfe1ad55e84bf0c89774650326f09
|
|
| MD5 |
cd55c8192da5ec7b30eb0e97dd6041f2
|
|
| BLAKE2b-256 |
e2e4f10b8e8d6ea528284d71cd6e2c6e4c8d4a123484250d5381e1c781521123
|
Provenance
The following attestation bundles were made for cyclonedx_buildroot-2.0.0.tar.gz:
Publisher:
release.yml on CycloneDX/cyclonedx-buildroot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyclonedx_buildroot-2.0.0.tar.gz -
Subject digest:
0786aa7c7e7607db7133186b480a1c1165fdfe1ad55e84bf0c89774650326f09 - Sigstore transparency entry: 195731721
- Sigstore integration time:
-
Permalink:
CycloneDX/cyclonedx-buildroot@95a92240cd31d060b3c8f12d44bde4960b75c9ee -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CycloneDX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@95a92240cd31d060b3c8f12d44bde4960b75c9ee -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file cyclonedx_buildroot-2.0.0-py3-none-any.whl.
File metadata
- Download URL: cyclonedx_buildroot-2.0.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9a7a8d9685fc2352b22299e30ab03a08a28019a43f56244ac5d413f2b601b07
|
|
| MD5 |
41198fbdaa146d6654eb8777f019425f
|
|
| BLAKE2b-256 |
21167a358f8a9638a527b0e78bb8969d376464c9d3b9ffd7a891c526cec72fb0
|
Provenance
The following attestation bundles were made for cyclonedx_buildroot-2.0.0-py3-none-any.whl:
Publisher:
release.yml on CycloneDX/cyclonedx-buildroot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyclonedx_buildroot-2.0.0-py3-none-any.whl -
Subject digest:
b9a7a8d9685fc2352b22299e30ab03a08a28019a43f56244ac5d413f2b601b07 - Sigstore transparency entry: 195731722
- Sigstore integration time:
-
Permalink:
CycloneDX/cyclonedx-buildroot@95a92240cd31d060b3c8f12d44bde4960b75c9ee -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CycloneDX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@95a92240cd31d060b3c8f12d44bde4960b75c9ee -
Trigger Event:
workflow_dispatch
-
Statement type: