Skip to content

Commit d4ba081

Browse files
committed
Added govulncheck as make vuln
1 parent 56f6dcc commit d4ba081

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ INSTALL_PATH ?= /usr/local/bin
1919
.PHONY: integration integration-nats integration-vault integration-aws integration-debug
2020
.PHONY: test-nats-recovery test-nats-monitor test-nats-load
2121
.PHONY: debug-vault test-vault-auth test-vault-kv test-vault-load
22-
.PHONY: fmt vet security gosec trivy coverage coverage-text
22+
.PHONY: fmt vet security gosec trivy vuln coverage coverage-text
2323
.PHONY: bench bench-full
2424
.PHONY: deps check ci install-tools
2525
.PHONY: test-color
@@ -172,7 +172,7 @@ vet: ## Run go vet for static analysis
172172
@echo "Running go vet..."
173173
@go vet ./...
174174

175-
security: gosec trivy ## Run all security checks (gosec + trivy)
175+
security: gosec trivy vuln ## Run all security checks (gosec + trivy + govulncheck)
176176

177177
gosec: ## Run gosec security scanner
178178
@echo "Running gosec..."
@@ -192,6 +192,15 @@ trivy: ## Run trivy vulnerability scanner
192192
exit 1; \
193193
fi
194194

195+
vuln: ## Run govulncheck for Go vulnerability scanning
196+
@echo "Running govulncheck..."
197+
@if command -v govulncheck >/dev/null 2>&1; then \
198+
govulncheck ./...; \
199+
else \
200+
echo "govulncheck not installed. Run 'make install-tools' first."; \
201+
exit 1; \
202+
fi
203+
195204
coverage: test-unit ## Generate HTML coverage report
196205
@echo "Generating coverage report..."
197206
@go tool cover -html=$(COVERAGE_FILE) -o $(COVERAGE_HTML)
@@ -231,6 +240,7 @@ ci: vet test-unit build test-cli ## Run full CI pipeline (vet, test, build, test
231240
install-tools: ## Install development tools
232241
@echo "Installing development tools..."
233242
@go install github.com/securego/gosec/v2/cmd/gosec@latest
243+
@go install golang.org/x/vuln/cmd/govulncheck@latest
234244
@echo "Installing trivy..."
235245
@if [[ "$$(uname)" == "Darwin" ]]; then \
236246
brew install aquasecurity/trivy/trivy; \

0 commit comments

Comments
 (0)