forked from tendermint/tendermint
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add govulncheck workflow (tendermint#9903)
* Add vulncheck target to Makefile Signed-off-by: Thane Thomson <[email protected]> * ci: Add govulncheck workflow Signed-off-by: Thane Thomson <[email protected]> Signed-off-by: Thane Thomson <[email protected]>
- Loading branch information
1 parent
82ec855
commit 8b7ae93
Showing
2 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Check for Go vulnerabilities | ||
# Runs https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck to proactively | ||
# check for vulnerabilities in code packages if there were any changes made to | ||
# any Go code or dependencies. | ||
# | ||
# Run `make vulncheck` from the root of the repo to run this workflow locally. | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- release/** | ||
|
||
jobs: | ||
govulncheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.18" | ||
- uses: actions/checkout@v3 | ||
- uses: technote-space/get-diff-action@v6 | ||
with: | ||
PATTERNS: | | ||
**/*.go | ||
go.mod | ||
go.sum | ||
Makefile | ||
- name: govulncheck | ||
run: make vulncheck | ||
if: "env.GIT_DIFF != ''" |
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