Chapter 1. Downloading, converting, and analyzing your SBOM
The following procedure explains how to inspect your SBOM with TPA. Specifically, it outlines how to download an SBOM, convert the SBOM into a compatible format, and analyze the SBOM with TPA.
You shouldn’t require this procedure because RHTAP 1.5 automatically publishes your SBOM to TPA when building your application with any of the supported CI providers: Tekton, Jenkins, GitLab CI, and GitHub Actions. Note that GitHub Actions is a Technology Preview feature and has not been fully tested.
Follow this procedure if you prefer to extract the SBOM manually and keep a local copy.
Procedure:
In your container registry, find the full address of the container image whose SBOM you want to inspect. The address has the format registry/namespace/image:tag. For example, quay.io/app/app-image:ff59e21cc…
NoteDo not use the address of the SBOM image, which ends with
.sbom. Use the address of the image for the actual application.In your CLI, use
cosignto download the SBOM. Redirect the output to a file you can reference later. Make sure the new filename ends with.json.cosign download sbom quay.io/redhat/rhtap-app:8d34c03188cf294a77339b2a733b1f6811263a369b309e6b170d9b489abc0334 > /tmp/sbom.json
cosign download sbom quay.io/redhat/rhtap-app:8d34c03188cf294a77339b2a733b1f6811263a369b309e6b170d9b489abc0334 > /tmp/sbom.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow (Optional) Your SBOM ultimately appears in the TPA 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 TPA 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 here, if you wish.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to store the Bombastic API URL as an environment variable:
bombastic_api_url="https://$(oc -n rhtap-tpa get route --selector app.kubernetes.io/name=bombastic-api -o jsonpath='{.items[].spec.host}')"$ bombastic_api_url="https://$(oc -n rhtap-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 RHTAP. The examples assume you used a namespace calledrhtap.In your CLI, create a new
token_issuer_urlenvironment variable with the following value:token_issuer_url=https://$(oc -n rhtap-keycloak get route --selector app=keycloak -o jsonpath='{.items[].spec.host}')/realms/chicken/protocol/openid-connect/token$ token_issuer_url=https://$(oc -n rhtap-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 rhtap secrets/rhtap-trustification-integration --template={{.data.oidc_client_secret}} | base64 -d)$ TPA__OIDC__WALKER_CLIENT_SECRET=$(kubectl get -n rhtap secrets/rhtap-trustification-integration --template={{.data.oidc_client_secret}} | base64 -d)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to obtain a token for the BOMbastic API. The token allows you to upload the SBOM.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Try to upload the SBOM.
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 CycloneDX, 1.4. You can disregard warnings about merging packages with different pURLs; they indicate that Syft might discard some data from the original SBOM, but that data is not crucial.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 Then try to upload the SBOM again:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Access your cluster that is running RHTAP through the OpenShift Console.
-
In the rhtap 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 TPA.
Select your SBOM (the most recent upload) and see what insights TPA has provided about your application based on that SBOM.
- Go to the Dependency Analytics Report tab to view vulnerabilities and remediations.
Revised on 2025-04-30 03:56:00 UTC