Skip to content

ci: add SBOM generation as a reusable workflow - #435

Open
nbuckwalt wants to merge 2 commits into
masterfrom
feat/sbom-generation
Open

ci: add SBOM generation as a reusable workflow#435
nbuckwalt wants to merge 2 commits into
masterfrom
feat/sbom-generation

Conversation

@nbuckwalt

Copy link
Copy Markdown
Contributor

Summary

  • Adds sbom.yml as a reusable workflow (workflow_call) — keeps pipeline.yml clean and allows the SBOM workflow to be invoked independently in future
  • pipeline.yml calls it via uses: ./.github/workflows/sbom.yml after build-image and build-helm-chart, skipping PRs and Dependabot runs
  • Generates four SBOMs using Syft v1.49.0:
    • sbom-image.cdx.json — container image, CycloneDX
    • sbom-image.spdx.json — container image, SPDX
    • sbom-source.cdx.json — source tree (post dotnet restore), CycloneDX
    • sbom-helm.cdx.json — Helm chart .tgz, CycloneDX
  • All four files are attached to every GitHub Release alongside existing manifests and Helm schema

Drivers: Customer procurement requirements and EO 14028 / EU CRA compliance.

Test plan

  • Trigger a non-PR push to master and confirm generate-sbom job runs and the sbom artifact appears
  • Confirm PRs and Dependabot builds skip the generate-sbom job
  • Trigger a release tag and confirm all four SBOM files appear in GitHub Release assets
  • Inspect sbom-image.cdx.json to verify NuGet packages and OS-level packages from the base image are present

🤖 Generated with Claude Code

Adds sbom.yml (workflow_call) invoked from pipeline.yml after build-image
and build-helm-chart. Generates CycloneDX + SPDX for the container image,
CycloneDX for the source tree (post dotnet restore), and CycloneDX for the
Helm chart tgz. All four SBOMs are published as GitHub Release assets.

Drivers: customer procurement requirements and EO 14028 / EU CRA compliance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nbuckwalt
nbuckwalt requested a review from a team as a code owner July 23, 2026 20:42
- release-public: require generate-sbom.result == 'success' so a skipped
  SBOM job (dependabot actor, etc.) cannot proceed to download a
  non-existent artifact and block the release
- setup-dotnet: add cache: 'nuget' to avoid re-downloading the full
  NuGet closure on every run
- Install Syft: replace curl|sh with anchore/sbom-action/download-syft
  (SHA-pinned composite action) for verified binary installation
- Generate Source SBOM: exclude .git/.github from the scan and add a
  comment noting project.assets.json provides transitive NuGet deps
- Generate Helm Chart SBOM: replace fragile ls|head -1 with a bash array
  glob and an explicit existence check for a clearer failure message

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant