Skip to content

CICD-186 · Create CycloneDX software inventory ​

Encyclopedia · Workflow security fundamentals · All snippets

Previous · CICD-185 · Next · CICD-187

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites trusted repository, verified inputs and read-only default access.
  • Platforms local-linux, github-actions, gitea-actions.
  • Parameters IMAGE_REF.

2. Copy the snippet ​

bash
syft "${IMAGE_REF:?}" -o cyclonedx-json=sbom.json
jq -e '.bomFormat=="CycloneDX"' sbom.json

3. How it works ​

The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate.

4. Verify the result ​

Build an SBOM for the exact candidate, then attach its digest and provenance.

Validation syntax-validated (Bash parse). Status definitions.