Skip to content

Commit 74aba17

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 74aba17

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
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
@@ -23,8 +22,11 @@ jobs:
2322
uses: actions/setup-go@v5
2423
with:
2524
go-version: '~1.22'
26-
- name: Clean dist directory
2725
run: rm -rf dist || true
26+
- name: Install Syft to generate SBOMs
27+
run: |
28+
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b $HOME/bin
29+
echo "$HOME/bin" >> $GITHUB_PATH
2830
- name: Run GoReleaser
2931
uses: goreleaser/goreleaser-action@v6
3032
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)