-
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.
build: add vulnerability scanners 🔒
- Loading branch information
1 parent
b32b027
commit 49bcb30
Showing
2 changed files
with
36 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: "Tests" | ||
name: Tests | ||
|
||
on: | ||
push: | ||
|
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,35 @@ | ||
name: Vulnerability Scan | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
vulnerability: | ||
name: Vulnerability Scan | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: Install vulnerability scanners | ||
run: | | ||
go install golang.org/x/vuln/cmd/govulncheck@v1 | ||
go install github.com/google/osv-scanner/cmd/osv-scanner@v1 | ||
- name: Run govulncheck | ||
run: govulncheck ./... | ||
|
||
- name: Run OSV Scanner | ||
run: osv-scanner -r . |