Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 bump gosec to 2.18.2 #1475

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions hack/gosec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-podman}"
if [ "${IS_CONTAINER}" != "false" ]; then
export XDG_CACHE_HOME="/tmp/.cache"

gosec -severity medium --confidence medium -quiet ./...
# It seems like gosec does not handle submodules well. Therefore we skip them and run separately.
gosec -severity medium --confidence medium -quiet -exclude-dir=apis -exclude-dir=hack/tools ./...
(cd apis && gosec -severity medium --confidence medium -quiet ./...)
(cd hack/tools && gosec -severity medium --confidence medium -quiet ./...)
else
"${CONTAINER_RUNTIME}" run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/metal3-io/baremetal-operator:ro,z" \
--entrypoint sh \
--workdir /go/src/github.com/metal3-io/baremetal-operator \
docker.io/securego/gosec:2.14.0@sha256:73858f8b1b9b7372917677151ec6deeceeaa40c5b02753080bd647dede14e213 \
/go/src/github.com/metal3-io/baremetal-operator/hack/gosec.sh "${@}"
fi;
docker.io/securego/gosec:2.18.2@sha256:2f9daee1739765788945b79de7f46229f33fda5ed35127393d8a1e459f3a7577 \
/go/src/github.com/metal3-io/baremetal-operator/hack/gosec.sh "$@"
fi