File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : go escapes detect
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ escapes_detect :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@main
11+ - uses : actions/setup-go@main
12+ with :
13+ go-version : 1.18
14+ - name : run escapes detect
15+ run : make escapes_detect
Original file line number Diff line number Diff line change 1+ name : go vulnerability detect
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ vulnerability_detect :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@main
11+ - uses : actions/setup-go@main
12+ with :
13+ go-version : 1.18
14+ - name : run vulnerability detect
15+ run : make govulncheck
Original file line number Diff line number Diff line change @@ -141,6 +141,15 @@ test: ginkgo-set tidy-vendor
141141test-verbose : ginkgo-set tidy-vendor
142142 @go test -tags $(GO_BUILD_TAGS ) -covermode=atomic -coverprofile=coverage.out -v ./... --race --bench=. -cover --count=1 --vet=all
143143
144+ escapes_detect : tidy-vendor
145+ @go build -tags $(GO_BUILD_TAGS ) -gcflags=" -m -l" ./... | grep " escapes to heap" || true
146+
147+ set_govulncheck :
148+ @go install golang.org/x/vuln/cmd/govulncheck@latest
149+
150+ govulncheck : set_govulncheck tidy-vendor
151+ @govulncheck -v ./... || true
152+
144153format :
145154 gofmt -e -d -s -l -w pkg/ cmd/
146155
You can’t perform that action at this time.
0 commit comments