build: Makefile: add Go vulnerability checker (#14028)

* build: Makefile: add Go vulnerability checker

Adds the Go vulnerability checker to the Makefile as a directive
dependency to the all directive to ensure that we get security
updates scalably.

* add gh action

* bump to 1.19.3 due to vulnerabilities

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Emmanuel T Odeke
2022-12-02 11:31:02 +00:00
committed by GitHub
co-authored by Julien Robert
parent 754ca3169e
commit bcfb7dc330
14 changed files with 52 additions and 45 deletions
+6 -1
View File
@@ -109,7 +109,7 @@ ifeq (debug,$(findstring debug,$(COSMOS_BUILD_OPTIONS)))
BUILD_FLAGS += -gcflags "all=-N -l"
endif
all: tools build lint test
all: tools build lint test vulncheck
# The below include contains the tools and runsim targets.
include contrib/devtools/Makefile
@@ -145,6 +145,11 @@ mocks: $(MOCKS_DIR)
sh ./scripts/mockgen.sh
.PHONY: mocks
vulncheck: $(BUILDDIR)/
GOBIN=$(BUILDDIR) go install golang.org/x/vuln/cmd/govulncheck@latest
$(BUILDDIR)/govulncheck ./...
$(MOCKS_DIR):
mkdir -p $(MOCKS_DIR)