From 5dad557868691e92deaafd0bcabedc5c7685ef58 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 8 Sep 2022 18:35:31 +0300 Subject: [PATCH] Makefile: check for vulnerabilities in used Go packages with govulncheck when running `make check-all` See https://go.dev/blog/vuln --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 04705006f..d839cc2ab 100644 --- a/Makefile +++ b/Makefile @@ -338,7 +338,7 @@ errcheck: install-errcheck install-errcheck: which errcheck || GO111MODULE=off go get github.com/kisielk/errcheck -check-all: fmt vet lint errcheck golangci-lint +check-all: fmt vet lint errcheck golangci-lint govulncheck test: go test ./lib/... ./app/... @@ -394,6 +394,12 @@ golangci-lint: install-golangci-lint install-golangci-lint: which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.48.0 +govulncheck: install-govulncheck + govulncheck ./... + +install-govulncheck: + which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest + install-wwhrd: which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd