diff --git a/project-words.txt b/project-words.txt index a7f5b54c..759f0dd5 100644 --- a/project-words.txt +++ b/project-words.txt @@ -292,3 +292,4 @@ nokyaml buildvcs behaviour GOFLAGS +gocache diff --git a/scripts/secure.sh b/scripts/secure.sh index 956961dc..11df0749 100755 --- a/scripts/secure.sh +++ b/scripts/secure.sh @@ -3,9 +3,11 @@ set -o errexit set -o pipefail -if command -v gosec &> /dev/null -then - gosec "${PWD}" ./... -else - ./bin/gosec "${PWD}" ./... -fi \ No newline at end of file +OPTS=( + -exclude-dir=vendor + -exclude-dir=.gomodcache + -exclude-dir=.gocache +) + +command -v gosec &> /dev/null && BIN=gosec || BIN=./bin/gosec +"${BIN}" "${OPTS[@]}" "${PWD}" ./...