Inspecting your SBOM using Red Hat Trusted Profile Analyzer
Learn how to scan your SBOM to gain actionable information about the security posture of your application.
Abstract
Preface Copy linkLink copied to clipboard!
When Red Hat Advanced Developer Suite - software supply chain builds your application images, it also provides a software bill of materials (SBOM). The SBOM lists all the software libraries that the image uses. You can use the SBOM to identify security vulnerabilities.
However, the SBOM is long and difficult to read. To turn the raw SBOM into actionable information, you can use the Trusted Profile Analyzer (TPA). For example, the TPA can identify dependencies in your image that are targets of known Common Vulnerabilities and Exploits (CVEs).
Chapter 1. Downloading, converting, and analyzing your SBOM Copy linkLink copied to clipboard!
The following procedure explains how to inspect your software bill of materials (SBOM) with the Red Hat Trusted Profile Analyzer (RHTPA). Specifically, the procedure outlines how to download an SBOM, convert the SBOM into a compatible format, and analyze the SBOM with the RHTPA.
You shouldn’t require this procedure because the Red Hat Advanced Developer Suite - software supply chain (RHADS - SSC) 1.8 automatically publishes your SBOM to the RHTPA when building your application with any of the supported CI providers.
Follow this procedure if you prefer to extract the SBOM manually and keep a local copy.
Prerequisites
You have installed the following software on your cluster:
- Cosign
- Syft
- jq
Procedure
In your container registry, find the full address of the container image whose SBOM you want to inspect. The address has the following format:
<registry>/<namespace>/<image>:<tag>
<registry>/<namespace>/<image>:<tag>Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
quay.io/app/app-image:ff59e21cc…
quay.io/app/app-image:ff59e21cc…Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteDo not use the address of the SBOM image, which ends with
.sbom. Use the address of the image for the actual application.Use
cosignto download the SBOM by running the following command:cosign download sbom <registry>/<namespace>/<image>:<tag> \ > /tmp/sbom.json
$ cosign download sbom <registry>/<namespace>/<image>:<tag> \ > /tmp/sbom.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow Redirect the output to a file you can reference later. Make sure the new filename ends with
.json.(Optional) Your SBOM is displayed in the RHTPA UI with a name listed in this
.jsonfile. By default, Syft creates that name based on the filepath of the SBOM. If you want your SBOM to appear in the RHTPA UI with a more meaningful name, you must manually change it in the.jsonfile you just downloaded. Specifically, you must replace the name in the.metadata.componentobject. You can optionally add aversionfield.vim /tmp/sbom.json
$ vim /tmp/sbom.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow "component": { "bom-ref": "fdef64df97f1d419", "type": "file", "name": "/var/lib/containers/storage/vfs/dir/3b3009adcd335d2b3902c5a7014d22b2beb6392b1958f1d9c7aabe24acab2deb" #Replace this with a meaningful name }"component": { "bom-ref": "fdef64df97f1d419", "type": "file", "name": "/var/lib/containers/storage/vfs/dir/3b3009adcd335d2b3902c5a7014d22b2beb6392b1958f1d9c7aabe24acab2deb" #Replace this with a meaningful name }Copy to Clipboard Copied! Toggle word wrap Toggle overflow Store the Bombastic API URL as an environment variable by running the following command:
bombastic_api_url="https://$(oc -n tssc-tpa get route \ --selector app.kubernetes.io/name=bombastic-api \ -o jsonpath='{.items[].spec.host}')"$ bombastic_api_url="https://$(oc -n tssc-tpa get route \ --selector app.kubernetes.io/name=bombastic-api \ -o jsonpath='{.items[].spec.host}')"Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIn this command and the next command, after
-n, be sure to enter the namespace in which you installed RHADS - SSC. The examples assume you used a namespace calledtssc.Create a new
token_issuer_urlenvironment variable by running the following command and value:token_issuer_url=https://$(oc -n tssc-keycloak get route \ --selector app=keycloak \ -o jsonpath='{.items[].spec.host}')/realms/chicken/protocol/openid-connect/token$ token_issuer_url=https://$(oc -n tssc-keycloak get route \ --selector app=keycloak \ -o jsonpath='{.items[].spec.host}')/realms/chicken/protocol/openid-connect/tokenCopy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
TPA__OIDC__WALKER_CLIENT_SECRETenvironment variable and provide your TPA OIDC Walker client secret as its value:TPA__OIDC__WALKER_CLIENT_SECRET=$(kubectl get \ -n tssc secrets/tssc-trustification-integration \ --template={{.data.oidc_client_secret}} | base64 -d)$ TPA__OIDC__WALKER_CLIENT_SECRET=$(kubectl get \ -n tssc secrets/tssc-trustification-integration \ --template={{.data.oidc_client_secret}} | base64 -d)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Obtain a token for the Bombastic API by running the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The token allows you to upload the SBOM.
Upload the SBOM by running the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you receive the error message
storage error: invalid storage content, use Syft to convert your SBOM to an earlier version such as CycloneDX version 1.4 by running the following command:syft convert /tmp/sbom.json -o cyclonedx-json@1.4=/tmp/sbom-1-4.json
$ syft convert /tmp/sbom.json -o cyclonedx-json@1.4=/tmp/sbom-1-4.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow You can disregard warnings about merging packages with different pURLs. These warnings indicate that Syft might discard some data from the original SBOM, but that data is not crucial.
Upload the SBOM again by running the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Access your cluster that is running RHADS - SSC through the OpenShift Console.
-
In the tssc project, navigate to Networking > Routes. Open the URL listed on the same row as the
spog-uiservice. - Use the Register button to create a new account and authenticate to RHTPA.
Select your SBOM (the most recent upload) and see what insights RHTPA has provided about your application based on that SBOM.
- Go to the Dependency Analytics Report tab to view vulnerabilities and remediations.
Revised on 2026-02-04 23:24:07 UTC