Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 767 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 767 Bytes

cyclonedx-sbom-filter

Filters cyclonedx-py json files by pipdeptree json output

Usage

  1. Install your package and cyclonedx-bom and pipdeptree (preferably in a virtual environment)
$ pip install <package_name> cyclonedx-bom pipdeptree
  1. Create SBOM and dependency file
# create SBOM of current virtual env
$ cyclonedx-py -pb --format json -e

# create pipdeptree file
$ pipdeptree -p <package_name> --json > dependencies.json
  1. Filter SBOM
$ python filter-sbom.py --sbom cyclonedx.json --dependencies dependencies.json --out cyclonedx_filtered.json

# or also extend dependencies
$ python filter-sbom.py --sbom cyclonedx.json --dependencies dependencies.json --out cyclonedx_filtered.json --extend-dependencies