cyclonedx-bom


Namecyclonedx-bom JSON
Version 4.4.3 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-04-26 11:56:13
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/)'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](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.

## 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/level/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/d9/80/00b178f03b3c6ef9e84747fa2f432f9c45126bab8828f555a197e84ea439/cyclonedx_bom-4.4.3.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/)'s\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.\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/level/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": "4.4.3",
    "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": "339597aa5802ca403392a2d42b3fd7d1972bf9725a122b1c8d5285452bc26bdf",
                "md5": "f9393411b68ada39352975d59a2e6394",
                "sha256": "36026f9b222a855772d607032da1991ee1dccf1cbd1e74872af51bd4acfcc397"
            },
            "downloads": -1,
            "filename": "cyclonedx_bom-4.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f9393411b68ada39352975d59a2e6394",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 50995,
            "upload_time": "2024-04-26T11:56:11",
            "upload_time_iso_8601": "2024-04-26T11:56:11.126485Z",
            "url": "https://files.pythonhosted.org/packages/33/95/97aa5802ca403392a2d42b3fd7d1972bf9725a122b1c8d5285452bc26bdf/cyclonedx_bom-4.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d98000b178f03b3c6ef9e84747fa2f432f9c45126bab8828f555a197e84ea439",
                "md5": "edb10867b549a0ced6bffb33c5a193db",
                "sha256": "088dfff2084e9df60924975ec82b15f5e44ec5bd8ef2a29ed43905ee2b84a6e2"
            },
            "downloads": -1,
            "filename": "cyclonedx_bom-4.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "edb10867b549a0ced6bffb33c5a193db",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 2143917,
            "upload_time": "2024-04-26T11:56:13",
            "upload_time_iso_8601": "2024-04-26T11:56:13.541787Z",
            "url": "https://files.pythonhosted.org/packages/d9/80/00b178f03b3c6ef9e84747fa2f432f9c45126bab8828f555a197e84ea439/cyclonedx_bom-4.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 11:56:13",
    "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.24779s