Skip to content

Commit f54fc89

Browse files
Add SBOM generation for Cyber Resilience Act compliance
- 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.
1 parent f7a02ad commit f54fc89

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
goreleaser:
1212
runs-on: ubuntu-latest
1313

14-
1514
steps:
1615
- name: Checkout
1716
uses: actions/checkout@v4
@@ -25,6 +24,10 @@ jobs:
2524
go-version: '~1.22'
2625
- name: Clean dist directory
2726
run: rm -rf dist || true
27+
- name: Install Syft to generate SBOMs
28+
run: |
29+
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b $HOME/bin
30+
echo "$HOME/bin" >> $GITHUB_PATH
2831
- name: Run GoReleaser
2932
uses: goreleaser/goreleaser-action@v6
3033
with:

build/.goreleaser.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,12 @@ release:
6868
github:
6969
owner: kubernetes-sigs
7070
name: kubebuilder
71+
72+
# Add the SBOM configuration at the end to generate SBOM files
73+
sboms:
74+
- id: kubebuilder-sbom
75+
artifacts: binary
76+
cmd: syft
77+
args: ["$artifact", "--output", "cyclonedx-json=$document"]
78+
documents:
79+
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.cyclonedx.sbom.json"

0 commit comments

Comments
 (0)