BOMs

Bills of Materials stand at the forefront of both BOMnipotents functionality and name. A BOM is a list of all components that make up a product. In the context of cybersecurity, the most prominent variant is the Software Bill of Materials (SBOM), but BOMs allow for more general considerations as well.

For BOM interactions beyond reading, you need the BOM_MANAGEMENT permission. The section about Access Management describes how it is granted.

Uploading

To upload a BOM, call:

Input
bomnipotent_client bom upload /home/your_project/sbom.cdx.json
Output
[INFO] Uploaded BOM Your Project_1.0.0

BOMnipotent expects its BOMs in the structured CycloneDX JSON format.

Consult the Syft tutorial to learn how to generate a BOM for your product.

The BOMnipotent Client will read the file at the provided path and upload its content. It can then be viewed by the consumers with appropriate permissions.

BOMs for Consumers describes how to list and download the BOMs on the server.

To add a BOM to the database, the BOMnipotent Client has to have some additional information: a name, a version, and optionally a TLP label. The identifiers name and version can either be inferred (recommended), or overwritten, as described below.

Name and Version

BOMnipotent uses name and version to identify a BOM. It tries to infer these from the provided CycloneDX JSON fields “metadata.component.name” and “metadata.component.version”. However, according to the CycloneDX specification , the metadata.component field is optional.

If no version is specified, BOMnipotent instead uses the date of “metadata.timestamp”, if available.

To avoid any complications, it is recommended that you specify a name and version when generating the BOM, as is shown in the Syft tutorial .

If for some reason your BOM lacks a name or version, or if it is incorrect, the BOMnipotent Client offers to remedy that via command line arguments:

Input (long variant)
bomnipotent_client bom upload /home/your_project/dev_env_sbom.cdx.json --name-overwrite="Other Project" --version-overwrite="2.7.1"
Input (short variant)
bomnipotent_client bom upload /home/your_project/dev_env_sbom.cdx.json -n "Other Project" -v "2.7.1"
Output
[WARN] Warning: Overwriting name with 'Other Project'. The data stored on the server will differ from the provided file.
[WARN] Warning: Overwriting version with '2.7.1'. The data stored on the server will differ from the provided file.
[INFO] Uploaded BOM Other Project_2.7.1

Important: The BOMnipotent Client will in this case modify the data before sending it to the server. It does not modify the local file, as that would be overstepping. This means that your local file and the data on the server are now out-of-sync. What’s maybe worse, if you signed your BOM, your signature is now invalid.

If you do use this option, it is thus recommended that you immediately download the BOM from the server (as described in BOMs for Consumers ) and replace your local file with the result.

TLP Classification

For consumers, BOMnipotent manages access to data using the Traffic Light Protocol (TLP) . The CycloneDX Format on the other hand does not currently support document classification.

To tell BOMnipotent how to classify a document, you have two options:

  1. Set a default TLP Label in the server config. This will then be used for all BOMs without further specifications.
  2. Provide a tlp classification via command line argument:
Input (long variant)
bomnipotent_client bom upload /home/your_project/container_sbom.cdx.json --tlp=WHITE # This makes the BOM public.
Input (short variant)
bomnipotent_client bom upload /home/your_project/container_sbom.cdx.json -t WHITE # This makes the BOM public.
Output
[INFO] Uploaded BOM Your Project Container_1.2.3

If you do neither, BOMnipotent will treat any unclassified documents as if they were labelled TLP:RED, and will log a warning every time it has to do that.

Conflict Handling

The combination of name and version of the main component of a BOM need to be unique. Trying to upload another document with the same combination results in an error.

Input
bomnipotent_client bom upload /home/your_project/sbom.cdx.json
Output
[ERROR] Received response:
409 Conflict
BOM Your Project_1.0.0 already exists in the database.

You can override this behaviour with the “on-existing” option, telling BOMnipotent to either skip or replace conflicting documents:

Input (long variant)
bomnipotent_client bom upload /home/your_project/sbom.cdx.json --on-existing=skip
Input (short variant)
bomnipotent_client bom upload /home/your_project/sbom.cdx.json -o skip
Output
[INFO] 
Input (long variant)
bomnipotent_client bom upload /home/your_project/sbom.cdx.json --on-existing=replace
Input (short variant)
bomnipotent_client bom upload /home/your_project/sbom.cdx.json -o replace
Output
[INFO] Modified BOM Your Project_1.0.0.

Modifying

In the simplest case, modifying an existing BOM works very much like uploading a new one.

Input
bomnipotent_client bom modify /home/your_project/sbom.cdx.json
Output
[INFO] Modified BOM Your Project_1.0.0.

This will infer the name and version from the document, and overwrite the existing content on the server. If the data does not exist on the server, it will return a 404 Not Found error.

Modifying TLP Label

If a TLP label had previously been assigned to the BOM, a modification of the contents will not automatically alter it.

If you want to specify a new TLP label, you can do so via argument:

Input (long variant)
bomnipotent_client bom modify /home/your_project/sbom.cdx.json --tlp=AMBER
Input (short variant)
bomnipotent_client bom modify /home/your_project/sbom.cdx.json -t AMBER
Output
[INFO] Modified BOM Your Project_1.0.0.

If the contents of the BOM have not changed and you just want to modify the TLP label, you do not need to upload the document again. Instead of providing a path to a file, you can specify name and version of the BOM you want to reclassify:

Input (long variant)
bomnipotent_client bom modify --name="Other Project" --version="2.7.1" --tlp=GREEN
Input (short variant)
bomnipotent_client bom modify -n "Other Project" -v "2.7.1" -t GREEN
Output
[INFO] Modified BOM Other Project_2.7.1.

If you specify “none”, “default” or “unlabelled” as the TLP label, any existing classification will be removed, and the server falls back to the default TLP Label of the server config:

Input (long variant)
bomnipotent_client bom modify /home/your_project/sbom.cdx.json --tlp=none
bomnipotent_client bom modify /home/your_project/sbom.cdx.json --tlp=default # Does the same
bomnipotent_client bom modify /home/your_project/sbom.cdx.json --tlp=unlabeled # Does the same
Input (short variant)
bomnipotent_client bom modify /home/your_project/sbom.cdx.json -t none
bomnipotent_client bom modify /home/your_project/sbom.cdx.json -t default # Does the same
bomnipotent_client bom modify /home/your_project/sbom.cdx.json -t unlabeled # Does the same
Output
[INFO] Modified BOM Your Project_1.0.0.
[INFO] Modified BOM Your Project_1.0.0.
[INFO] Modified BOM Your Project_1.0.0.

Modifying Name or Version

If the document you are uploading has a different name or version than the data it shall modify, you need to provide that information to the BOMnipotent Client using command line arguments:

Input (long variant)
bomnipotent_client bom modify /home/your_project/dev_env_sbom.cdx.json --name="Other Project" --version="2.7.1"
Input (short variant)
bomnipotent_client bom modify /home/your_project/dev_env_sbom.cdx.json -n "Other Project" -v "2.7.1"
Output
[INFO] Modified BOM Your Development Environment_1.2.3.

BOMnipotent will infer the new data from the document you provide and change the database entries accordingly.

As with uploading, it is possible to overwrite the name and/or version stored in the local document:

Input
bomnipotent_client bom modify /home/your_project/dev_env_sbom.cdx.json --name-overwrite="Other Project" --version-overwrite="2.7.1"

Important: As with uploading, this modifies the JSON data before uploading to the server! The same caveats apply.

If the data on the server has a different name and/or version than specified in the document, you can combine the specification with an overwrite of the data:

Input (long variant)
bomnipotent_client bom modify /home/your_project/dev_env_sbom.cdx.json --name="Your Development Environment" --version="1.2.3" --name-overwrite="Best Project" --version-overwrite="3.1.4"
Input (short variant)
bomnipotent_client bom modify /home/your_project/dev_env_sbom.cdx.json -n "Your Development Environment" -v "1.2.3" --name-overwrite="Best Project" --version-overwrite="3.1.4"
Output
[WARN] Warning: Overwriting name with 'Best Project'. The data stored on the server will differ from the provided file.
[WARN] Warning: Overwriting version with '3.1.4'. The data stored on the server will differ from the provided file.
[INFO] Modified BOM Best Project_3.1.4.

Changing name and/or version without providing the complete document is not supported.

Deleting

Deleting a BOM is very straightforward:

Input
bomnipotent_client bom delete "Best Project" "3.1.4"
Output
[INFO] Deleted BOM Best Project_3.1.4

If the BOM does not exist, the server will return 404 Not Found. If it does exists, it is removed from the database.

All components and vulnerabilities associated with the BOM are also deleted.