Skip to content

Commit

Permalink
Generate SBOM (securego#655)
Browse files Browse the repository at this point in the history
* Generate SBOM

* Update release.yml

* Update .github/workflows/release.yml

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

* Publish bom.json

* Ignore SBOMs generated during CI

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
  • Loading branch information
VinodAnandan and mmorel-35 authored Jun 21, 2021
1 parent 03e8767 commit 5032f99
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ jobs:
- name : Get release version
id: get_version
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
- name: Generate SBOM
uses: CycloneDX/gh-gomod-generate-sbom@v0.2.0
with:
json: true
output: bom.json
resolve-licenses: true
version: latest
- name: Release Binaries
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ _testmain.go
.DS_Store

.vscode

# SBOMs generated during CI
/bom.json
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
project_name: gosec

release:
extra_files:
- glob: ./bom.json
github:
owner: securego
name: gosec
Expand Down

0 comments on commit 5032f99

Please sign in to comment.