Skip to main content

A python CLI tool to extract a merged software bill of materials and license info from a vcpkg manifest.

Project description

📓 Software Bill-of-Materials for vcpkg manifests.

Python Version PyPI PyPI - Wheel PyPI - Status GitHub Release Date PyPI - Downloads

GitHub repo size PyPI - License Code style: black Black Format Discord


A python command line tool to extract a combined software bill of materials and license info from a vcpkg manifest.

Installation

:snake: PyPi

Open a command line and run:

pip install vcpkg-sbom

:octocat: Local

Downlaod the repo:

git clone https://github.com/moverseai/vcpkg-sbom vcpkg-sbom
cd vcpkg-sbom

From the repo's root path run:

pip install .

For an editable install run:

pip install -e .

:keyboard: Usage

vcpkg-sbom PATH/TO/PROJECT/vcpkg_installed
ID Package
0 package name #1
1 package name #2
2 package name #3
... package name #N

Merging spdx: ━━━━━━━━━━━━━━━━━━ 100% 0:00:00

Extracting & merging copyrights ...

Merging copyrights: ━━━━━━━━━━━━━━━━━━ 0% -:--:--

[!NOTE]
The output file is a SPDX-2.3 SPDXRef-DOCUMENT that merges all available *.spdx.json files from the manifest's installed packages.

[!TIP]
The default triplet is x64-windows and is appended to the cmd line given path before searching for all installed packages.

[!IMPORTANT]
The output files (*.spdx.json, and optionally, *_license_info.json and *_EULA.txt) are written to the current working directory from where the command was executed.


🔧 Command Line API

$ vcpkg-sbom --help
usage: A software bill of materials extracter and merger for `vcpkg` manifest projects.

positional arguments:
  vcpkg_root            Path to the `vcpkg_installed` folder of your manifest project.

options:
  -h, --help            show this help message and exit
  -t TRIPLET, --triplet TRIPLET
                        The `vcpkg` triplet to use.
  -p PROJECT, --project PROJECT
                        The project's name that will be used for the merged output files.
  -n NAMESPACE, --namespace NAMESPACE
                        The software's namespace to use for the `spdx` file.
  -o ORGANIZATION, --organization ORGANIZATION
                        The organization or company name to use for the `spdx` file.
  -e EMAIL, --email EMAIL
                        The email to use for the `spdx` file.
  -c, --copyright       Additionally extract and merge all copyright files in a `*.txt` file.
  -l, --license         Additionally extract and merge all license types in a `*.json` file.

[!IMPORTANT] Default values:

  • triplet: x64-windows
  • project: project
  • namespace: https://spdx.org/spdxdocs/
  • organization: org
  • email: info@org.com
  • copyright: flag to enable copyright file merging
  • license: flag to enable license info merging

[!TIP]
Info on how to choose a proper namespace can be found here

Acknowledgements / Material

Disclaimer / Limitations

[!WARNING] As indicated at the vcpkg docs: The licensing information provided for each package in the vcpkg registry represents Microsoft's best understanding of the licensing requirements. However, this information may not be definitive. Users are advised to verify the exact licensing requirements for each package they intend to use, as it is ultimately their responsibility to ensure compliance with the applicable licenses.

While vcpkg offers a lot of information about licensing, this information should be scrutinized. Any tool that builds on top of this information provided by vcpkg is reliant on the legibility of the provided data, and should thus, be also scrutinized for correctness.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vcpkg_sbom-0.0.6.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

vcpkg_sbom-0.0.6-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file vcpkg_sbom-0.0.6.tar.gz.

File metadata

  • Download URL: vcpkg_sbom-0.0.6.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vcpkg_sbom-0.0.6.tar.gz
Algorithm Hash digest
SHA256 39de054d514196126a7735a016c9231d700b92763bd1fe66e0b82f86bd8d5db7
MD5 b68051b8416fe747aebe739cd3e204f4
BLAKE2b-256 810637858b7413c9a3fda9daf78584bb25664a6e2a61275782c6308277e7b596

See more details on using hashes here.

File details

Details for the file vcpkg_sbom-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: vcpkg_sbom-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vcpkg_sbom-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 26f4bc67292aec68bcf2950fc345322abc67ba99f761a80b8bf8c221610de4dd
MD5 e254d745c1ecf5db8a08ff5898ead260
BLAKE2b-256 dd6913678287877c331de61512be2658a92ad95194681fc65ec717036c16ad41

See more details on using hashes here.

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