-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add vulnerability check * Update action versions * Use go.mod as version source * Fail check step if has erros
- Loading branch information
1 parent
5b0f3e5
commit 8ac6105
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Check repository for vulnerabilities | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
vulnerabilities: | ||
env: | ||
report-file: report.txt | ||
name: Check vulnerabilities | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Install govulncheck | ||
run: go install golang.org/x/vuln/cmd/govulncheck@latest | ||
- name: Run check | ||
run: govulncheck -show verbose ./... 2>&1 | tee ${{ env.report-file }} | ||
- name: Collect report | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: 'govulncheck-report' | ||
path: ${{ env.report-file }} | ||
overwrite: true |