CycloneDX Software Bill of Materials (SBOM) generator for Python projects and environments
Project description
CycloneDX Python SBOM Generation Tool
This tool generates Software Bill of material (SBOM) documents in OWASP CycloneDX format.
Supported data sources are:
- Python (virtual) environment
Poetry
manifest and lockfilePipenv
manifest and lockfile- Pip's
requirements.txt
format PDM
manifest and lockfile are not explicitly supported.
However, PDM's Python virtual environments are fully supported. See the docs for an example.Conda
as a package manager is no longer supported since version 4.
However, conda's Python environments are fully supported via the methods listed above. See the docs for an example.
Based on OWASP Software Component Verification Standard for Software Bill of Materials' criteria, this tool is capable of producing SBOM documents almost passing Level-2 (only signing needs to be done externally).
The resulting SBOM documents follow official specifications and standards,
and might have properties following
cdx:python
Namespace Taxonomy,
cdx:pipenv
Namespace Taxonomy,
cdx:poetry
Namespace Taxonomy
.
Read the full documentation for more details.
Requirements
- Python
>=3.8,<4
However, there are older versions of this tool available, which
support Python >=2.7
.
Installation
Install this from Python Package Index (PyPI) using your preferred Python package manager.
install via one of commands:
python -m pip install cyclonedx-bom # install via pip
pipx install cyclonedx-bom # install via pipx
poetry add cyclonedx-bom # install via poetry
# ... you get the hang
Usage
Call via one of commands:
cyclonedx-py # call script
python3 -m cyclonedx_py # call python module CLI
Basic usage
$ cyclonedx-py --help
usage: cyclonedx-py [-h] [--version] command ...
Creates CycloneDX Software Bill of Materials (SBOM) from Python projects and environments.
positional arguments:
command
environment Build an SBOM from Python (virtual) environment
requirements Build an SBOM from Pip requirements
pipenv Build an SBOM from Pipenv manifest
poetry Build an SBOM from Poetry project
options:
-h, --help show this help message and exit
--version show program's version number and exit
Advanced usage and details
See the full documentation for advanced usage and details on input formats, switches and options.
Python Support
We endeavour to support all functionality for all current actively supported Python versions.
However, some features may not be possible/present in older Python versions due to their lack of support.
However, there are older versions of this tool, that support python>=2.7
.
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. See the documentation for an example.
Contributing
Feel free to open issues, bugreports or pull requests.
See the CONTRIBUTING file for details, and how to run/setup locally.
Copyright & License
CycloneDX BOM 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
File details
Details for the file cyclonedx_bom-5.1.1.tar.gz
.
File metadata
- Download URL: cyclonedx_bom-5.1.1.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32b3686a879700e3cebf8a177187d1c10b5f3fbbb2803ba3011e5f4af3b9d131 |
|
MD5 | 512c1424e75ebc50d2ffe42d59ba1301 |
|
BLAKE2b-256 | 4b5dbddd478934cb829af007ce5b2db5a411651daa7aab1529591498ff0a501f |
Provenance
The following attestation bundles were made for cyclonedx_bom-5.1.1.tar.gz
:
Publisher:
release.yml
on CycloneDX/cyclonedx-python
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
cyclonedx_bom-5.1.1.tar.gz
- Subject digest:
32b3686a879700e3cebf8a177187d1c10b5f3fbbb2803ba3011e5f4af3b9d131
- Sigstore transparency entry: 147794191
- Sigstore integration time:
- Predicate type:
File details
Details for the file cyclonedx_bom-5.1.1-py3-none-any.whl
.
File metadata
- Download URL: cyclonedx_bom-5.1.1-py3-none-any.whl
- Upload date:
- Size: 55.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2be2578c540298c3c3707db5dbc56ac93b3f2f2c13076b9e7d89a8c58160b08 |
|
MD5 | b3da067d29d7834f5a6ee79efb3fb6ae |
|
BLAKE2b-256 | eac5ceab2bfe8739b772d30e78fc238d2c1cdf6b4d14247d32657ce669abb0d2 |
Provenance
The following attestation bundles were made for cyclonedx_bom-5.1.1-py3-none-any.whl
:
Publisher:
release.yml
on CycloneDX/cyclonedx-python
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
cyclonedx_bom-5.1.1-py3-none-any.whl
- Subject digest:
a2be2578c540298c3c3707db5dbc56ac93b3f2f2c13076b9e7d89a8c58160b08
- Sigstore transparency entry: 147794192
- Sigstore integration time:
- Predicate type: