From ad0b8897bf6aa376267741ff3ba2dadb3eaa6d35 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 24 Mar 2020 11:27:01 +0100 Subject: [PATCH] tests: gosec does not support '-mod=vendor' Signed-off-by: Niels de Vos --- scripts/gosec.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/gosec.sh b/scripts/gosec.sh index c8faa52a5..c3de635e9 100755 --- a/scripts/gosec.sh +++ b/scripts/gosec.sh @@ -3,6 +3,9 @@ set -o pipefail if [[ -x "$(command -v gosec)" ]]; then + # gosec does not support -mod=vendor, so fallback to non-module support and + # assume all dependencies are available in ./vendor already + export GO111MODULE=off find cmd pkg -type d -print0 | xargs --null gosec else echo "WARNING: gosec not found, skipping security tests" >&2