Skip to content

Commit

Permalink
Merge pull request #4248 from camilamacedo86/sboms
Browse files Browse the repository at this point in the history
🌱 Add SBOM generation for Cyber Resilience Act compliance
  • Loading branch information
k8s-ci-robot authored Oct 31, 2024
2 parents 64161fe + f54fc89 commit fd86838
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
goreleaser:
runs-on: ubuntu-latest


steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -25,6 +24,10 @@ jobs:
go-version: '~1.22'
- name: Clean dist directory
run: rm -rf dist || true
- name: Install Syft to generate SBOMs
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b $HOME/bin
echo "$HOME/bin" >> $GITHUB_PATH
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand Down
9 changes: 9 additions & 0 deletions build/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,12 @@ release:
github:
owner: kubernetes-sigs
name: kubebuilder

# Add the SBOM configuration at the end to generate SBOM files
sboms:
- id: kubebuilder-sbom
artifacts: binary
cmd: syft
args: ["$artifact", "--output", "cyclonedx-json=$document"]
documents:
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.cyclonedx.sbom.json"

0 comments on commit fd86838

Please sign in to comment.