ci: add SBOM generation as a reusable workflow - #435
Open
nbuckwalt wants to merge 2 commits into
Open
Conversation
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>
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sbom.ymlas a reusable workflow (workflow_call) — keeps pipeline.yml clean and allows the SBOM workflow to be invoked independently in futurepipeline.ymlcalls it viauses: ./.github/workflows/sbom.ymlafterbuild-imageandbuild-helm-chart, skipping PRs and Dependabot runssbom-image.cdx.json— container image, CycloneDXsbom-image.spdx.json— container image, SPDXsbom-source.cdx.json— source tree (postdotnet restore), CycloneDXsbom-helm.cdx.json— Helm chart.tgz, CycloneDXDrivers: Customer procurement requirements and EO 14028 / EU CRA compliance.
Test plan
generate-sbomjob runs and thesbomartifact appearsgenerate-sbomjobsbom-image.cdx.jsonto verify NuGet packages and OS-level packages from the base image are present🤖 Generated with Claude Code