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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce gosec for security checks #2506

Merged
merged 1 commit into from Oct 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions hack/go-sec.sh
@@ -0,0 +1,17 @@
#!/bin/sh
# Example: ./hack/gosec.sh
set -x

if [ "$IS_CONTAINER" != "" ]; then
if [ ! "$(command -v gosec >/dev/null)" ]; then
go get github.com/securego/gosec/cmd/gosec
fi
gosec -severity high -confidence high -exclude G304 ./cmd/... ./data/... ./pkg/... "${@}"
else
podman run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
--workdir /go/src/github.com/openshift/installer \
docker.io/openshift/origin-release:golang-1.12 \
./hack/go-sec.sh "${@}"
fi