From 467b1395fa2b31eed2c566a27f25aeb3f966ed22 Mon Sep 17 00:00:00 2001 From: Dominic Letz Date: Mon, 8 Jul 2024 16:14:26 +0200 Subject: [PATCH] Update seccheck download method --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9fec0ba..5f5307a 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,10 @@ lint: runtime # G404 (CWE-338): Use of weak random number generator (math/rand instead of crypto/rand). .PHONY: seccheck seccheck: runtime - cd tools && go install github.com/securego/gosec/v2/cmd/gosec@latest + if [ ! -f $(GOPATH)/bin/gosec ]; \ + then \ + curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.20.0; \ + fi; $(GOPATH)/bin/gosec -exclude=G104,G108,G110,G112,G114,G204,G304,G402,G404 -exclude-dir .history ./... .PHONY: clean