cyclonedx-bom


Namecyclonedx-bom JSON
Version 5.1.1 PyPI version JSON
download
home_pagehttps://github.com/CycloneDX/cyclonedx-python/#readme
SummaryCycloneDX Software Bill of Materials (SBOM) generator for Python projects and environments
upload_time2024-11-09 13:48:04
maintainerJan Kowalleck
docs_urlNone
authorJan Kowalleck
requires_python<4.0,>=3.8
licenseApache-2.0
keywords owasp cyclonedx bill-of-materials bom software-bill-of-materials sbom environment virtualenv venv poetry pipenv requirements pdm conda spdx licenses purl package-url dependency-graph
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CycloneDX Python SBOM Generation Tool

[![shield_pypi-version]][link_pypi]
[![shield_docker-version]][link_docker]
[![shield_rtfd]][link_rtfd]
[![shield_gh-workflow-test]][link_gh-workflow-test]
[![shield_coverage]][link_codacy]
[![shield_ossf-best-practices]][link_ossf-best-practices]
[![shield_license]][license_file]  
[![shield_website]][link_website]
[![shield_slack]][link_slack]
[![shield_groups]][link_discussion]
[![shield_twitter-follow]][link_twitter]

----

This tool generates Software Bill of material (SBOM) documents in OWASP [CycloneDX](https://cyclonedx.org/) format.  
Supported data sources are:

* Python (virtual) environment
* `Poetry` manifest and lockfile
* `Pipenv` 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](https://scvs.owasp.org/scvs/v2-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](https://github.com/CycloneDX/specification),
and might have properties following 
[`cdx:python` Namespace Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/python.md),
[`cdx:pipenv` Namespace Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/pipenv.md),
[`cdx:poetry` Namespace Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/poetry.md)
.

Read the full [documentation][link_rtfd] 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)][link_pypi] using your preferred Python package manager.

install via one of commands:

```shell
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:

```shell
cyclonedx-py             # call script
python3 -m cyclonedx_py  # call python module CLI
```

### Basic usage

```shellSession
$ 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][link_rtfd] 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](https://www.python.org/downloads/).
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][cyclonedx-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][contributing_file] 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][license_file] file for the full license.

[license_file]: https://github.com/CycloneDX/cyclonedx-python/blob/main/LICENSE
[contributing_file]: https://github.com/CycloneDX/cyclonedx-python/blob/main/CONTRIBUTING.md
[link_rtfd]: https://cyclonedx-bom-tool.readthedocs.io/

[cyclonedx-library]: https://pypi.org/project/cyclonedx-python-lib

[shield_gh-workflow-test]: https://img.shields.io/github/actions/workflow/status/CycloneDX/cyclonedx-python/python.yml?branch=main&logo=GitHub&logoColor=white "build"
[shield_rtfd]: https://img.shields.io/readthedocs/cyclonedx-bom-tool?logo=readthedocs&logoColor=white "Read the Docs"
[shield_pypi-version]: https://img.shields.io/pypi/v/cyclonedx-bom?logo=Python&logoColor=white&label=PyPI "PyPI"
[shield_docker-version]: https://img.shields.io/docker/v/cyclonedx/cyclonedx-python?logo=docker&logoColor=white&label=docker "docker"
[shield_license]: https://img.shields.io/github/license/CycloneDX/cyclonedx-python?logo=open%20source%20initiative&logoColor=white "license"
[shield_website]: https://img.shields.io/badge/https://-cyclonedx.org-blue.svg "homepage"
[shield_slack]: https://img.shields.io/badge/slack-join-blue?logo=Slack&logoColor=white "slack join"
[shield_groups]: https://img.shields.io/badge/discussion-groups.io-blue.svg "groups discussion"
[shield_twitter-follow]: https://img.shields.io/badge/Twitter-follow-blue?logo=Twitter&logoColor=white "twitter follow"
[shield_coverage]: https://img.shields.io/codacy/coverage/682ceda9a1044832a087afb95ae280fe?logo=Codacy&logoColor=white "test coverage"
[shield_ossf-best-practices]: https://img.shields.io/cii/percentage/7957?label=OpenSSF%20best%20practices "OpenSSF best practices"

[link_gh-workflow-test]: https://github.com/CycloneDX/cyclonedx-python/actions/workflows/python.yml?query=branch%3Amain
[link_pypi]: https://pypi.org/project/cyclonedx-bom/
[link_docker]: https://hub.docker.com/r/cyclonedx/cyclonedx-python
[link_codacy]: https://app.codacy.com/gh/CycloneDX/cyclonedx-python
[link_ossf-best-practices]: https://www.bestpractices.dev/projects/7957
[link_website]: https://cyclonedx.org/
[link_slack]: https://cyclonedx.org/slack/invite
[link_discussion]: https://groups.io/g/CycloneDX
[link_twitter]: https://twitter.com/CycloneDX_Spec


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/CycloneDX/cyclonedx-python/#readme",
    "name": "cyclonedx-bom",
    "maintainer": "Jan Kowalleck",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": "jan.kowalleck@gmail.com",
    "keywords": "OWASP, CycloneDX, bill-of-materials, BOM, software-bill-of-materials, SBOM, environment, virtualenv, venv, Poetry, Pipenv, requirements, PDM, Conda, SPDX, licenses, PURL, package-url, dependency-graph",
    "author": "Jan Kowalleck",
    "author_email": "jan.kowalleck@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4b/5d/bddd478934cb829af007ce5b2db5a411651daa7aab1529591498ff0a501f/cyclonedx_bom-5.1.1.tar.gz",
    "platform": null,
    "description": "# CycloneDX Python SBOM Generation Tool\n\n[![shield_pypi-version]][link_pypi]\n[![shield_docker-version]][link_docker]\n[![shield_rtfd]][link_rtfd]\n[![shield_gh-workflow-test]][link_gh-workflow-test]\n[![shield_coverage]][link_codacy]\n[![shield_ossf-best-practices]][link_ossf-best-practices]\n[![shield_license]][license_file]  \n[![shield_website]][link_website]\n[![shield_slack]][link_slack]\n[![shield_groups]][link_discussion]\n[![shield_twitter-follow]][link_twitter]\n\n----\n\nThis tool generates Software Bill of material (SBOM) documents in OWASP [CycloneDX](https://cyclonedx.org/) format.  \nSupported data sources are:\n\n* Python (virtual) environment\n* `Poetry` manifest and lockfile\n* `Pipenv` manifest and lockfile\n* Pip's `requirements.txt` format\n* `PDM` manifest and lockfile are not explicitly supported.  \n  However, PDM's Python virtual environments are fully supported. See the docs for an example.\n* `Conda` as a package manager is no longer supported since version 4.  \n  However, conda's Python environments are fully supported via the methods listed above. See the docs for an example.\n\nBased on [OWASP Software Component Verification Standard for Software Bill of Materials](https://scvs.owasp.org/scvs/v2-software-bill-of-materials/)'\ncriteria, this tool is capable of producing SBOM documents almost passing Level-2 (only signing needs to be done externally).\n\nThe resulting SBOM documents follow [official specifications and standards](https://github.com/CycloneDX/specification),\nand might have properties following \n[`cdx:python` Namespace Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/python.md),\n[`cdx:pipenv` Namespace Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/pipenv.md),\n[`cdx:poetry` Namespace Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/poetry.md)\n.\n\nRead the full [documentation][link_rtfd] for more details.\n\n## Requirements\n\n* Python `>=3.8,<4`\n\nHowever, there are older versions of this tool available, which\nsupport Python `>=2.7`.\n\n## Installation\n\nInstall this from [Python Package Index (PyPI)][link_pypi] using your preferred Python package manager.\n\ninstall via one of commands:\n\n```shell\npython -m pip install cyclonedx-bom   # install via pip\npipx install cyclonedx-bom            # install via pipx\npoetry add cyclonedx-bom              # install via poetry\n# ... you get the hang\n```\n\n## Usage\n\nCall via one of commands:\n\n```shell\ncyclonedx-py             # call script\npython3 -m cyclonedx_py  # call python module CLI\n```\n\n### Basic usage\n\n```shellSession\n$ cyclonedx-py --help\nusage: cyclonedx-py [-h] [--version] command ...\n\nCreates CycloneDX Software Bill of Materials (SBOM) from Python projects and environments.\n\npositional arguments:\n  command\n    environment   Build an SBOM from Python (virtual) environment\n    requirements  Build an SBOM from Pip requirements\n    pipenv        Build an SBOM from Pipenv manifest\n    poetry        Build an SBOM from Poetry project\n\noptions:\n  -h, --help      show this help message and exit\n  --version       show program's version number and exit\n```\n\n### Advanced usage and details\n\nSee the full [documentation][link_rtfd] for advanced usage and details on input formats, switches and options.\n\n## Python Support\n\nWe endeavour to support all functionality for all [current actively supported Python versions](https://www.python.org/downloads/).\nHowever, some features may not be possible/present in older Python versions due to their lack of support.\nHowever, there are older versions of this tool, that support `python>=2.7`.\n\n## Internals\n\nThis tool utilizes the [CycloneDX Python library][cyclonedx-library] to generate the actual data structures, and serialize and validate them.  \n\nThis 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.\nHowever, the CLI is stable - you might call it programmatically. See the documentation for an example.\n\n## Contributing\n\nFeel free to open issues, bugreports or pull requests.  \nSee the [CONTRIBUTING][contributing_file] file for details, and how to run/setup locally.\n\n## Copyright & License\n\nCycloneDX BOM is Copyright (c) OWASP Foundation. All Rights Reserved.  \nPermission to modify and redistribute is granted under the terms of the Apache 2.0 license.  \nSee the [LICENSE][license_file] file for the full license.\n\n[license_file]: https://github.com/CycloneDX/cyclonedx-python/blob/main/LICENSE\n[contributing_file]: https://github.com/CycloneDX/cyclonedx-python/blob/main/CONTRIBUTING.md\n[link_rtfd]: https://cyclonedx-bom-tool.readthedocs.io/\n\n[cyclonedx-library]: https://pypi.org/project/cyclonedx-python-lib\n\n[shield_gh-workflow-test]: https://img.shields.io/github/actions/workflow/status/CycloneDX/cyclonedx-python/python.yml?branch=main&logo=GitHub&logoColor=white \"build\"\n[shield_rtfd]: https://img.shields.io/readthedocs/cyclonedx-bom-tool?logo=readthedocs&logoColor=white \"Read the Docs\"\n[shield_pypi-version]: https://img.shields.io/pypi/v/cyclonedx-bom?logo=Python&logoColor=white&label=PyPI \"PyPI\"\n[shield_docker-version]: https://img.shields.io/docker/v/cyclonedx/cyclonedx-python?logo=docker&logoColor=white&label=docker \"docker\"\n[shield_license]: https://img.shields.io/github/license/CycloneDX/cyclonedx-python?logo=open%20source%20initiative&logoColor=white \"license\"\n[shield_website]: https://img.shields.io/badge/https://-cyclonedx.org-blue.svg \"homepage\"\n[shield_slack]: https://img.shields.io/badge/slack-join-blue?logo=Slack&logoColor=white \"slack join\"\n[shield_groups]: https://img.shields.io/badge/discussion-groups.io-blue.svg \"groups discussion\"\n[shield_twitter-follow]: https://img.shields.io/badge/Twitter-follow-blue?logo=Twitter&logoColor=white \"twitter follow\"\n[shield_coverage]: https://img.shields.io/codacy/coverage/682ceda9a1044832a087afb95ae280fe?logo=Codacy&logoColor=white \"test coverage\"\n[shield_ossf-best-practices]: https://img.shields.io/cii/percentage/7957?label=OpenSSF%20best%20practices \"OpenSSF best practices\"\n\n[link_gh-workflow-test]: https://github.com/CycloneDX/cyclonedx-python/actions/workflows/python.yml?query=branch%3Amain\n[link_pypi]: https://pypi.org/project/cyclonedx-bom/\n[link_docker]: https://hub.docker.com/r/cyclonedx/cyclonedx-python\n[link_codacy]: https://app.codacy.com/gh/CycloneDX/cyclonedx-python\n[link_ossf-best-practices]: https://www.bestpractices.dev/projects/7957\n[link_website]: https://cyclonedx.org/\n[link_slack]: https://cyclonedx.org/slack/invite\n[link_discussion]: https://groups.io/g/CycloneDX\n[link_twitter]: https://twitter.com/CycloneDX_Spec\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "CycloneDX Software Bill of Materials (SBOM) generator for Python projects and environments",
    "version": "5.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/CycloneDX/cyclonedx-python/issues",
        "Documentation": "https://cyclonedx-bom-tool.readthedocs.io/",
        "Funding": "https://owasp.org/donate/?reponame=www-project-cyclonedx&title=OWASP+CycloneDX",
        "Homepage": "https://github.com/CycloneDX/cyclonedx-python/#readme",
        "Repository": "https://github.com/CycloneDX/cyclonedx-python/"
    },
    "split_keywords": [
        "owasp",
        " cyclonedx",
        " bill-of-materials",
        " bom",
        " software-bill-of-materials",
        " sbom",
        " environment",
        " virtualenv",
        " venv",
        " poetry",
        " pipenv",
        " requirements",
        " pdm",
        " conda",
        " spdx",
        " licenses",
        " purl",
        " package-url",
        " dependency-graph"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eac5ceab2bfe8739b772d30e78fc238d2c1cdf6b4d14247d32657ce669abb0d2",
                "md5": "b3da067d29d7834f5a6ee79efb3fb6ae",
                "sha256": "a2be2578c540298c3c3707db5dbc56ac93b3f2f2c13076b9e7d89a8c58160b08"
            },
            "downloads": -1,
            "filename": "cyclonedx_bom-5.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b3da067d29d7834f5a6ee79efb3fb6ae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 55639,
            "upload_time": "2024-11-09T13:48:02",
            "upload_time_iso_8601": "2024-11-09T13:48:02.344102Z",
            "url": "https://files.pythonhosted.org/packages/ea/c5/ceab2bfe8739b772d30e78fc238d2c1cdf6b4d14247d32657ce669abb0d2/cyclonedx_bom-5.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b5dbddd478934cb829af007ce5b2db5a411651daa7aab1529591498ff0a501f",
                "md5": "512c1424e75ebc50d2ffe42d59ba1301",
                "sha256": "32b3686a879700e3cebf8a177187d1c10b5f3fbbb2803ba3011e5f4af3b9d131"
            },
            "downloads": -1,
            "filename": "cyclonedx_bom-5.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "512c1424e75ebc50d2ffe42d59ba1301",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 2322279,
            "upload_time": "2024-11-09T13:48:04",
            "upload_time_iso_8601": "2024-11-09T13:48:04.836149Z",
            "url": "https://files.pythonhosted.org/packages/4b/5d/bddd478934cb829af007ce5b2db5a411651daa7aab1529591498ff0a501f/cyclonedx_bom-5.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-09 13:48:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CycloneDX",
    "github_project": "cyclonedx-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "cyclonedx-bom"
}
        
Elapsed time: 0.58956s