Skip to content

Commit

Permalink
Add SBOM generation for Cyber Resilience Act compliance
Browse files Browse the repository at this point in the history
- Integrated SBOM generation in GoReleaser using Syft to produce CycloneDX SBOMs.
- Updated GitHub Actions workflow to install Syft, enabling automated SBOM creation on release.
- This enhancement is part of ongoing efforts to align with the EU Cyber Resilience Act, ensuring transparency and security in our software supply chain.
  • Loading branch information
camilamacedo86 committed Oct 30, 2024
1 parent f7a02ad commit f54fc89
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 f54fc89

Please sign in to comment.