added makefile command for vulnerability checks (backport #577) (#580)

Co-authored-by: Zack Brady <zackbrady123@gmail.com>
This commit is contained in:
mergify[bot]
2026-05-01 11:22:57 -04:00
committed by GitHub
parent 70616882a5
commit 16def1ab73
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View File

@@ -16,3 +16,4 @@ fileserver/
cmd/hauler/binaries
testdata/certs/
coverage.out
vulncheck.out

View File

@@ -6,6 +6,7 @@ SHELL=/bin/bash
# set go variables
GO_FILES=./...
GO_COVERPROFILE=coverage.out
GO_VULNCHECKS=vulncheck.out
# set build variables
BIN_DIRECTORY=bin
@@ -44,6 +45,10 @@ vet:
test:
go test $(GO_FILES) -cover -race -covermode=atomic -coverprofile=$(GO_COVERPROFILE)
# check for vulnerabilities
vulns:
govulncheck $(GO_FILES) > $(GO_VULNCHECKS) 2>&1 || true
# cleanup artifacts
clean:
rm -rf $(BIN_DIRECTORY) $(DIST_DIRECTORY) $(GO_COVERPROFILE)
rm -rf $(BIN_DIRECTORY) $(DIST_DIRECTORY) $(GO_COVERPROFILE) $(GO_VULNCHECKS)