SBOM Grader
Project description
SBOM Grader
This project grades SBOMs according to Red Hat Product Security Guide to SBOMs.
Currently the script only fully supports SPDX v2.3 in json format. CycloneDX is partially supported in version v1.5 for Product SBOMs.
Installation
pip install sbomgrader
Quick start
To show the command line options, run the following command:
sbomgrader --help
This script uses both STDOUT and STDERR. STDOUT receives the output of the grading, while STDERR reports anything causing troubles to the command execution unrelated to the SBOM file.
Usage options
If you only specify the SBOM document, the script will try to estimate the SBOM type and apply all time-related cookbooks for that type (e.g. if it finds that an SBOM is for an RPM, it will run both rpm build and rpm release cookbooks). The release-time cookbook will take precedence in establishing the final grade.
To specify the cookbook to be used, use -c option. This option must be a reference
to an .y[a]ml file in the filesystem or a default cookbook. To list default cookbooks,
use option -l.
To specify SBOM type, the tool lets you specify content type -ct and SBOM type -st.
Component type is either product, image, image_index, rpm or generic. Generic type
only checks the common features of other types, the other types are described [here]
(https://redhatproductsecurity.github.io/security-data-guidelines/sbom/). The SBOM types
are also explained in the article linked. You can select values build or release.
The default passing grade is B. This can be changed with the argument -g and the target value.
The script outputs data in three possible formats. The default one in Markdown,
you can also select json or yaml.
Architecture
This project uses terms like Rules, RuleSets, Cookbooks and CookbookBundles. These are all representations of a test suite to run against an SBOM file.
CookbookBundles are composed of Cookbooks which reference RuleSets which are made of Rules.
Rules are specific tests to be run, RuleSets are suites of Rules.
Cookbook defines which force has to be applied on each rule for each SBOM type. You are completely free to create your own cookbook if the provided ones don't suit your needs. CookbookBundles are only aggregation of Cookbooks which ensures no test has to be run more than once on any document.
For details about Cookbooks, refer to the cookbooks/README.md file.
For details about RuleSets, refer to the rulesets/README.md file.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sbomgrader-0.1.3.tar.gz.
File metadata
- Download URL: sbomgrader-0.1.3.tar.gz
- Upload date:
- Size: 49.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d17dfcde398d2e229898d7662c2e3e74daea3ed1ea3e9f24155bfdeba4c6659
|
|
| MD5 |
c7ddbb23e08f5f3a55423670dbd3b420
|
|
| BLAKE2b-256 |
7833d74e2375a6980ef07b7759623f51d496782e55da81fb27886a6500af1b69
|
Provenance
The following attestation bundles were made for sbomgrader-0.1.3.tar.gz:
Publisher:
release-pypi.yml on BorekZnovustvoritel/SBOM-Grader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sbomgrader-0.1.3.tar.gz -
Subject digest:
8d17dfcde398d2e229898d7662c2e3e74daea3ed1ea3e9f24155bfdeba4c6659 - Sigstore transparency entry: 153268206
- Sigstore integration time:
-
Permalink:
BorekZnovustvoritel/SBOM-Grader@c3096cd2298a9be34688ce26ec5114488eaae916 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/BorekZnovustvoritel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c3096cd2298a9be34688ce26ec5114488eaae916 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sbomgrader-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sbomgrader-0.1.3-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36306b02f3540d93e0de299300b1cd3677fb8904cf3c0bf819e3f54d07e06914
|
|
| MD5 |
3c7fc7f3be2837367fa1df0e2c8b6e59
|
|
| BLAKE2b-256 |
9710d1ee7f1d1cdb4f28be554c0aa0de38a04c19658acf6cc802b6799f55fd39
|
Provenance
The following attestation bundles were made for sbomgrader-0.1.3-py3-none-any.whl:
Publisher:
release-pypi.yml on BorekZnovustvoritel/SBOM-Grader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sbomgrader-0.1.3-py3-none-any.whl -
Subject digest:
36306b02f3540d93e0de299300b1cd3677fb8904cf3c0bf819e3f54d07e06914 - Sigstore transparency entry: 153268207
- Sigstore integration time:
-
Permalink:
BorekZnovustvoritel/SBOM-Grader@c3096cd2298a9be34688ce26ec5114488eaae916 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/BorekZnovustvoritel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c3096cd2298a9be34688ce26ec5114488eaae916 -
Trigger Event:
workflow_dispatch
-
Statement type: