ceph-csi/scripts/gosec.sh
Niels de Vos c02413a663 build: Add -tags=nautilus to go test and go build
Build `GO_TAGS` based on the `CEPH_VERSION` from build.env. In case the
version is non-empty, pass `-tags=${CEPH_VERSION}` to any of the go
commandline and script that call go programs.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-06-30 07:55:37 +00:00

13 lines
376 B
Bash
Executable File

#!/bin/bash
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 internal -type d -print0 | xargs --null gosec "${GO_TAGS}"
else
echo "WARNING: gosec not found, skipping security tests" >&2
fi