A utility to create SBOM Reports in the SPDX or CDX formats
Project description
Mend SBOM Cli
Generation SBOM reports in the SPDX or CycloneDx formats
- Supported Operating Systems
- Prerequisites
- Installation
- Configuration Parameters
- Usage
- Execution Examples
- Other Section
Supported Operating Systems
- Linux (Bash): CentOS, Debian, Ubuntu
- Windows (PowerShell): 10, 2012, 2016
Prerequisites
- Python 3.9+
- Mend user with admin permissions
Installation
$ pip install mend-sbom-export-cli
Note: Depending on whether the package was installed as a root user or not, you need to make sure the package installation location was added to the
$PATH
environment variable.
Configuration Parameters
Note: Parameters can be specified as either command-line arguments, environment variables, or a combination of both.
Command-line arguments take precedence over environment variables.
CLI argument | Env. Variable | Type | Required | Description |
---|---|---|---|---|
‑‑help | switch |
No | Show help and exit | |
‑‑user-key | WS_USERKEY |
string |
Yes | Mend User Key |
‑‑api-key | WS_APIKEY |
string |
Yes | Mend API Key |
‑‑url | WS_WSS_URL |
string |
Yes | Mend Server URL |
‑‑product | WS_PRODUCTTOKEN |
string |
No | Empty String (Include all products). Comma-separated list of Mend Product Tokens that should be included |
‑‑project | WS_PROJECTTOKEN |
string |
No | Empty String (Include all projects). Comma-separated list of Mend Project Tokens that should be included |
‑‑exclude | WS_EXCLUDETOKEN |
string |
No | Empty String (No exclusions).Commsa-separated list of Mend Project Tokens that should be excluded |
‑‑licensetext | bool |
No | Include full license text for all libraries (default: False ) |
|
‑‑dir | string |
No | Output directory for the report files | |
‑‑type | string |
No | Report format [spdx cdx ] (default: spdx ) |
|
‑‑threads | int |
No | Number of threads to run in parallel for report generation (default: 10 ) |
Usage
Using command-line arguments only:
sbom_export_cli --user-key WS_USERKEY --api-key WS_APIKEY --url $WS_WSS_URL --product `ProductToken1`,`ProductToken2` --project `ProjectToken` --dir $OUTPUT_DIRECTORY
Using environment variables:
export WS_USERKEY=xxxxxxxxxxx
export WS_APIKEY=xxxxxxxxxxx
export WS_WSS_URL=https://saas.mend.io
sbom_export_cli --product `ProductToken`
Note: Either form is accepted. For the rest of the examples, the latter form would be used
Execution Examples
Note: In the following examples, $WS_USERKEY, $WS_APIKEY and $WS_WSS_URL are assumed to have been exported as environment variables.
Create CycloneDx SBOM reports
$ sbom_export_cli --project "$WS_PROJECTTOKEN" --dir $HOME/reports --type cdx
Create SPDX reports
$ sbom_export_cli --product "$WS_PRODUCTTOKEN" --dir $HOME/reports --licensetext True
Other Section
Other Subsection
Details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file mend_sbom_export_cli-23.9.2.1-py3-none-any.whl
.
File metadata
- Download URL: mend_sbom_export_cli-23.9.2.1-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0babf61b7ac2551bcbb44419cd9d4218e64d99eddf593a054071786262ff77c3 |
|
MD5 | 304157695e7b91bf018ee0048b7a86ea |
|
BLAKE2b-256 | c1634f2d68265951b41ee73caca14e5580540b82f77ace04719d77224071fb96 |