Skip to content

Include vulncheck in make #1285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/vulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@ jobs:
vulncheck:
name: Analysis
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.19 ]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Check for vulnerabilities
uses: kmulvey/[email protected]
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Get govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
shell: bash
- name: Run govulncheck
run: govulncheck ./...
shell: bash
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ all: build
getdeps:
@echo "Checking dependencies"
@mkdir -p ${GOPATH}/bin
@echo "Installing golangci-lint" && go install github.com/golangci/golangci-lint/cmd/[email protected]
@echo "Installing golangci-lint" && \
go install github.com/golangci/golangci-lint/cmd/[email protected] && \
echo "Installing govulncheck" && \
go install golang.org/x/vuln/cmd/govulncheck@latest

verify: getdeps govet gotest lint

Expand All @@ -51,6 +54,9 @@ govet:
gotest:
@go test -race ./...

vulncheck:
@${GOPATH}/bin/govulncheck ./...

clean:
@echo "Cleaning up all the generated files"
@find . -name '*.test' | xargs rm -fv
Expand Down