ready to test

This commit is contained in:
2026-04-03 15:11:33 -04:00
parent f8222f2953
commit f83527aa2d
2 changed files with 15 additions and 4 deletions

View File

@@ -2,13 +2,19 @@
set -eo pipefail
if [[ "$STATIC_FLAG" == "no" && "$VULN_SCAN" == "no" ]]; then
if [[ "$STATIC_FLAG" == "no" && "$VULN_CHECK" == "no" ]]; then
echo "[INFO] no security flags set, skipping!";
exit 0;
fi
toolchain=$(go mod edit go.mod -json | jq ".Toolchain");
version=$(go mod edit -json | jq ".Toolchain");
if [[ ! -z "$toolchain" ]]; then
version=$toolchain;
fi
if [[ "$STATIC_FLAG" == "yes" ]]; then
if gosec ./...; then
if GOTOOLCHAIN=$version gosec ./...; then
echo "[INFO] gosec passed!";
else
if [[ "$STATIC_FAIL" == "yes" ]]; then
@@ -21,7 +27,7 @@ if [[ "$STATIC_FLAG" == "yes" ]]; then
fi
if [[ "$VULN_CHECK" == "yes" ]]; then
if govulncheck ./...; then
if GOTOOLCHAIN=$version govulncheck ./...; then
echo "[INFO] govulncheck passed!";
else
if [[ "$VULN_FAIL" == "yes" ]]; then