Skip to content

Commit

Permalink
fix: switch to simple SBOM generation
Browse files Browse the repository at this point in the history
This change replaces Snyk SBOM generation with Github because the latter
is more detailed.
  • Loading branch information
smlx committed Mar 22, 2024
1 parent f2359a3 commit b77f087
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,18 @@ jobs:
- name: Set up environment
run: echo "GOVERSION=$(go version)" >> "$GITHUB_ENV"
- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
- uses: anchore/sbom-action/download-syft@9fece9e20048ca9590af301449208b2b8861333b # v0.15.9
- uses: advanced-security/sbom-generator-action@375dee8e6144d9fd0ec1f5667b4f6fb4faacefed # v0.0.1
id: sbom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Move sbom to avoid dirty git
run: mv "$GITHUB_SBOM_PATH" ./sbom.spdx.json
env:
GITHUB_SBOM_PATH: ${{ steps.sbom.outputs.fileName }}
- uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SBOM_PATH: ./sbom.spdx.json
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/dist
/cover.out
/cover.out.raw
/sbom.spdx.json
8 changes: 5 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ builds:
changelog:
use: github-native

sboms:
- artifacts: archive

signs:
- cmd: cosign
signature: "${artifact}.sig"
Expand Down Expand Up @@ -138,3 +135,8 @@ docker_signs:
- "--yes"
artifacts: all
output: true

release:
extra_files:
- glob: "{{ .Env.GITHUB_SBOM_PATH }}"
name_template: "{{ .ProjectName }}.v{{ .Version }}.sbom.spdx.json"

0 comments on commit b77f087

Please sign in to comment.