swarkentin / cyclonedx-python

Creates CycloneDX Software Bill-of-Materials (SBOM) from Python projects

Home Page:https://cyclonedx.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Docker Image License Website Slack Invite PyPI Group Discussion Twitter

CycloneDX Python Module

The CycloneDX module for Python creates a valid CycloneDX bill-of-material document containing an aggregate of all project dependencies. CycloneDX is a lightweight BOM specification that is easily created, human readable, and simple to parse.

Usage

Freezing

A bill-of-material such as CycloneDX expects exact version numbers. Therefore requirements.txt must be frozen. This can be accomplished via:

$ pip freeze > requirements.txt

Installing

$ pip install cyclonedx-bom

Options

By default, requirements.txt will be read from the current working directory and the resulting bom.xml will also be created in the current working directory. These options can be overwritten as follows:

$ cyclonedx-py
  Usage:  cyclonedx-py [OPTIONS]
  Options:
    -i <path> - the alternate filename to a frozen requirements.txt
    -o <path> - the bom file to create
    -j        - generate JSON instead of XML

License

Permission to modify and redistribute is granted under the terms of the Apache 2.0 license.

About

Creates CycloneDX Software Bill-of-Materials (SBOM) from Python projects

https://cyclonedx.org/

License:Apache License 2.0


Languages

Language:Python 95.9%Language:Makefile 2.6%Language:Dockerfile 0.9%Language:Shell 0.7%