From 29ad72f0484bcac0225cbeaa89dcd7c298812d72 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Mon, 13 May 2019 14:56:36 +0300 Subject: [PATCH] Chore: reintroduce gosec (#17021) It seems gosec memory issue was recently fixed. We should be good to go again Ref securego/gosec#307 --- pkg/services/notifications/codes.go | 2 +- scripts/backend-lint.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/services/notifications/codes.go b/pkg/services/notifications/codes.go index 6382b609036..b2bc9439549 100644 --- a/pkg/services/notifications/codes.go +++ b/pkg/services/notifications/codes.go @@ -1,7 +1,7 @@ package notifications import ( - "crypto/sha1" + "crypto/sha1" // #nosec "encoding/hex" "fmt" "time" diff --git a/scripts/backend-lint.sh b/scripts/backend-lint.sh index 064b8626fb2..5c337d2d2ea 100755 --- a/scripts/backend-lint.sh +++ b/scripts/backend-lint.sh @@ -15,7 +15,7 @@ go get -u github.com/alecthomas/gometalinter go get -u github.com/jgautheron/goconst/cmd/goconst go get -u honnef.co/go/tools/cmd/staticcheck go get -u github.com/mgechev/revive -#go get -u github.com/securego/gosec/cmd/gosec/... +go get -u github.com/securego/gosec/cmd/gosec/... go get -u github.com/golangci/golangci-lint/cmd/golangci-lint # use gometalinter when lints are not available in golangci or @@ -39,7 +39,7 @@ exit_if_fail go vet ./pkg/... exit_if_fail revive -formatter stylish -config ./scripts/revive.toml # TODO recheck the rules and leave only necessary exclusions -# exit_if_fail gosec -quiet \ -# -exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \ -# -conf=./scripts/gosec.json \ -# ./pkg/... +exit_if_fail gosec -quiet \ + -exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \ + -conf=./scripts/gosec.json \ + ./pkg/...