Skip to content

Commit f53cc3c

Browse files
committed
Makefile: Add arguments for govulncheck
Make it possible to specify extra arguments for govulncheck by setting GOVULNCHECK_ARGS. This is useful for finding vulnerabilities that govulncheck determines are irrelevant. Use GOVULNCHECK_ARGS="-show verbose" to see them. Signed-off-by: Lennart Jern <[email protected]>
1 parent 57ae27e commit f53cc3c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ PULL_POLICY ?= Always
120120
# Set build time variables including version details
121121
LDFLAGS := $(shell source ./hack/version.sh; version::ldflags)
122122

123+
# Extra arguments for govulncheck, e.g. "-show verbose"
124+
GOVULNCHECK_ARGS ?=
123125

124126
## --------------------------------------
125127
##@ Testing
@@ -596,8 +598,8 @@ verify-container-images: ## Verify container images
596598

597599
.PHONY: verify-govulncheck
598600
verify-govulncheck: $(GOVULNCHECK) ## Verify code for vulnerabilities
599-
$(GOVULNCHECK) ./... && R1=$$? || R1=$$?; \
600-
$(GOVULNCHECK) -C "$(TOOLS_DIR)" ./... && R2=$$? || R2=$$?; \
601+
$(GOVULNCHECK) $(GOVULNCHECK_ARGS) ./... && R1=$$? || R1=$$?; \
602+
$(GOVULNCHECK) $(GOVULNCHECK_ARGS) -C "$(TOOLS_DIR)" ./... && R2=$$? || R2=$$?; \
601603
if [ "$$R1" -ne "0" ] || [ "$$R2" -ne "0" ]; then \
602604
exit 1; \
603605
fi

0 commit comments

Comments
 (0)