Audit the supply chain of a release
Read the attestations attached to an Omnia image, check that a published SBOM file matches them, and rebuild the aggregate SBOM from the per-image documents.
Prerequisites
Section titled “Prerequisites”- Docker with
buildx, andjq. - Pull access to
ghcr.io/altairalabs. - For the last procedure, a checkout of the Omnia repository (for
hack/sbom-aggregate.py) andpython3.
The attestations are generated by BuildKit and are not signed. See Supply-chain evidence for what is published.
Read the SBOM from an image
Section titled “Read the SBOM from an image”docker buildx imagetools inspect \ ghcr.io/altairalabs/omnia-operator:<version> \ --format '{{json .SBOM}}'Read the provenance from an image
Section titled “Read the provenance from an image”docker buildx imagetools inspect \ ghcr.io/altairalabs/omnia-operator:<version> \ --format '{{json .Provenance}}'Confirm a published file matches the attestation
Section titled “Confirm a published file matches the attestation”-
Download and unpack the per-image documents, then export the attested package set:
Terminal window curl -sSLO https://charts.altairalabs.ai/sbom/<version>/omnia-<version>.sboms.tar.gztar -xzf omnia-<version>.sboms.tar.gzdocker buildx imagetools inspect \ghcr.io/altairalabs/omnia-operator:<version> \--format '{{json .SBOM}}' \| jq -S '.["linux/amd64"].SPDX.packages | map({name, versionInfo}) | sort' \> attested.json -
Export the same set from the published file and compare:
Terminal window jq -S '.packages | map({name, versionInfo}) | sort' \omnia-operator.linux-amd64.spdx.json > published.jsondiff attested.json published.json && echo "identical"
Rebuild the aggregate
Section titled “Rebuild the aggregate”-
Unpack the per-image documents into an empty directory:
Terminal window mkdir sbomstar -xzf omnia-<version>.sboms.tar.gz -C sboms/ -
Run the roll-up script from the repository checkout:
Terminal window python3 hack/sbom-aggregate.py \--input-dir sboms/ \--version <version> \--output aggregate.spdx.json
Verify
Section titled “Verify”Download the published aggregate and compare it with the rebuilt one, ignoring the two fields that differ on every run:
curl -sSLO https://charts.altairalabs.ai/sbom/<version>/omnia-<version>.aggregate.spdx.json
diff \ <(jq -S 'del(.creationInfo.created, .documentNamespace)' aggregate.spdx.json) \ <(jq -S 'del(.creationInfo.created, .documentNamespace)' omnia-<version>.aggregate.spdx.json) \ && echo "identical"creationInfo.created is a timestamp and documentNamespace carries a fresh UUID, so a rebuild never reproduces them.