Skip to main content

Create a software bill of materials from the direct dependencies of a Buildroot generated project

Project description

CycloneDX Buildroot

shield_pypi-version shield_gh-workflow-test shield_coverage shield_license
shield_website shield_slack shield_groups shield_twitter-follow


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 logo

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cyclonedx_buildroot-2.0.0.tar.gz (51.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cyclonedx_buildroot-2.0.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

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

Hashes for cyclonedx_buildroot-2.0.0.tar.gz
Algorithm Hash digest
SHA256 0786aa7c7e7607db7133186b480a1c1165fdfe1ad55e84bf0c89774650326f09
MD5 cd55c8192da5ec7b30eb0e97dd6041f2
BLAKE2b-256 e2e4f10b8e8d6ea528284d71cd6e2c6e4c8d4a123484250d5381e1c781521123

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyclonedx_buildroot-2.0.0.tar.gz:

Publisher: release.yml on CycloneDX/cyclonedx-buildroot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cyclonedx_buildroot-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cyclonedx_buildroot-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9a7a8d9685fc2352b22299e30ab03a08a28019a43f56244ac5d413f2b601b07
MD5 41198fbdaa146d6654eb8777f019425f
BLAKE2b-256 21167a358f8a9638a527b0e78bb8969d376464c9d3b9ffd7a891c526cec72fb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cyclonedx_buildroot-2.0.0-py3-none-any.whl:

Publisher: release.yml on CycloneDX/cyclonedx-buildroot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page