Skip to main content

CycloneDX Software Bill of Materials (SBOM) generation utility

Project description

CycloneDX Python SBOM Generation Tool

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


This tool generates Software Bill of material (SBOM) documents in CycloneDX format.
Supported data sources are:

  • Python (virtual) environment
  • Poetry manifest
  • Pipenv manifest
  • Pip's requirements.txt format
  • 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.

Based on OWASP Software Component Verification Standard for Software Bill of Materials's 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

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 classes - all code is intended to be internal and might change without any notice during version upgrades. However, the CLI is stable - you may call it programmatically like:

from sys import executable
from subprocess import run
run((executable, '-m', 'cyclonedx_py', '--help'))

Contributing

Feel free to open issues, bugreports or pull requests.
See the CONTRIBUTING file for details.

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

cyclonedx_bom-4.0.0rc4.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

cyclonedx_bom-4.0.0rc4-py3-none-any.whl (51.6 kB view details)

Uploaded Python 3

File details

Details for the file cyclonedx_bom-4.0.0rc4.tar.gz.

File metadata

  • Download URL: cyclonedx_bom-4.0.0rc4.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for cyclonedx_bom-4.0.0rc4.tar.gz
Algorithm Hash digest
SHA256 2c1a0fc8cb2d5d21566fcbf4638e3e52d0f502b2916ed418548e96e52cbbcf98
MD5 b443a4ef71ab56049a42013eaa6ba938
BLAKE2b-256 e84e1d523bade109b086fc1b6ee2b19feef06c33f9dcba70f7b21e638fc5f0ab

See more details on using hashes here.

Provenance

File details

Details for the file cyclonedx_bom-4.0.0rc4-py3-none-any.whl.

File metadata

File hashes

Hashes for cyclonedx_bom-4.0.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 115e06abd6934350a5d984ff10ad0b47bfe2c775b02836e86e8a5f13349eeb88
MD5 2753e1815ec9fd64b41bad9afb07f59d
BLAKE2b-256 03f174a0c328f8fe6f774772c22f710f76498b6ca7d0a01e941e360bbe27316e

See more details on using hashes here.

Provenance

Supported by

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