Add 'gosec' to the static-checks

Run static security scanning tool 'gosec' while testing.

URL: https://github.com/securego/gosec
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2019-08-30 12:23:10 +02:00
committed by mergify[bot]
parent dd668e59f1
commit 8f133e03b8
3 changed files with 15 additions and 0 deletions

9
scripts/gosec.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -o pipefail
if [[ -x "$(command -v gosec)" ]]; then
find cmd pkg -type d -print0 | xargs --null gosec
else
echo "WARNING: gosec not found, skipping security tests" >&2
fi