Files
gstack/scripts/cso-sbom-packages.jq
Garry Tan 10315cf44d v1.91.27.0 fix(cso): runtime staging can finish and a qualified scanner catalog can ship (#3041)
* v1.91.27.0 fix(cso): package-level signed SBOMs and staged probes in the verifier container

* Qualified scanner catalogs persist scan outcomes; catalog-state tests hold for either state; SBOM tests live with their owner
2026-10-05 10:00:47 -07:00

9 lines
547 B
Plaintext

# Reduce a BuildKit SPDX 2.3 SBOM to its package inventory before signing it.
# File entries (tens of thousands for Ruby or Python images) push the signed
# statement past actions/attest's 16 MiB limit; packages, their versions and
# package relationships are what CSO's release evidence relies on.
((.files // []) | map({key: .SPDXID, value: true}) | from_entries) as $files
| del(.files)
| .packages |= map(del(.hasFiles))
| .relationships |= map(select(($files[.spdxElementId] // false | not) and ($files[.relatedSpdxElement] // false | not)))