From 86cd96d264af7c6a29dfdf0f58001db04293b7c7 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Nov 2023 16:51:20 -0600 Subject: [PATCH 1/6] lint --- .golangci.yml | 2 +- x/registry/client/testutil/grpc.go | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 1d0df1c3..5a744879 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,7 +6,7 @@ run: linters: enable: - bodyclose - - depguard +# - depguard # 20231120 disable until https://github.com/golangci/golangci-lint/issues/3906 is released - dogsled - dupl - errcheck diff --git a/x/registry/client/testutil/grpc.go b/x/registry/client/testutil/grpc.go index 143dab90..2f9f64d3 100644 --- a/x/registry/client/testutil/grpc.go +++ b/x/registry/client/testutil/grpc.go @@ -15,6 +15,8 @@ import ( tmcli "github.com/tendermint/tendermint/libs/cli" ) +const badPath = "/asdasd" + func (s *IntegrationTestSuite) TestGRPCQueryParams() { val := s.network.Validators[0] sr := s.Require() @@ -28,7 +30,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() { }{ { "invalid url", - reqURL + "/asdasd", + reqURL + badPath, true, "", }, @@ -60,7 +62,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() { } } -//nolint: all +// nolint: all func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() { val := s.network.Validators[0] sr := s.Require() @@ -75,7 +77,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() { }{ { "invalid url", - reqUrl + "/asdasd", + reqUrl + badPath, true, "", func(authorityName string) { @@ -143,7 +145,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() { }{ { "invalid url", - reqURL + "/asdasd", + reqURL + badPath, true, "", func(authorityName string) { @@ -180,7 +182,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() { } } -//nolint: all +// nolint: all func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { val := s.network.Validators[0] sr := s.Require() @@ -195,7 +197,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { }{ { "invalid url", - reqUrl + "/asdasd", + reqUrl + badPath, true, "", func(bondId string) { @@ -252,7 +254,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { } } -//nolint: all +// nolint: all func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { val := s.network.Validators[0] sr := s.Require() @@ -267,7 +269,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { }{ { "invalid url", - reqUrl + "/asdasd", + reqUrl + badPath, true, "", func(authorityName string) { @@ -324,7 +326,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { } } -//nolint: all +// nolint: all func (s *IntegrationTestSuite) TestGRPCQueryListRecords() { val := s.network.Validators[0] sr := s.Require() @@ -339,7 +341,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryListRecords() { }{ { "invalid url", - reqUrl + "/asdasd", + reqUrl + badPath, true, "", func(bondId string) { @@ -409,7 +411,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByID() { }{ { "invalid url", - reqURL + "/asdasd", + reqURL + badPath, true, "", func(bondId string) string { @@ -478,7 +480,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByBondID() { }{ { "invalid url", - reqURL + "/asdasd", + reqURL + badPath, true, "", func(bondId string) { @@ -532,7 +534,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRegistryModuleBalance() { }{ { "invalid url", - reqURL + "/asdasd", + reqURL + badPath, true, "", func(bondId string) { @@ -583,7 +585,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryNamesList() { }{ { "invalid url", - reqURL + "/asdasd", + reqURL + badPath, true, "", func(authorityName string) { From 7c4ba0e6bbb03183d257604c589452b6cf625524 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Nov 2023 16:57:08 -0600 Subject: [PATCH 2/6] no space --- x/registry/client/testutil/grpc.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/registry/client/testutil/grpc.go b/x/registry/client/testutil/grpc.go index 2f9f64d3..bd6a570f 100644 --- a/x/registry/client/testutil/grpc.go +++ b/x/registry/client/testutil/grpc.go @@ -62,7 +62,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() { } } -// nolint: all +//nolint: all func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() { val := s.network.Validators[0] sr := s.Require() @@ -182,7 +182,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() { } } -// nolint: all +//nolint: all func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { val := s.network.Validators[0] sr := s.Require() @@ -254,7 +254,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { } } -// nolint: all +//nolint: all func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { val := s.network.Validators[0] sr := s.Require() @@ -326,7 +326,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { } } -// nolint: all +//nolint: all func (s *IntegrationTestSuite) TestGRPCQueryListRecords() { val := s.network.Validators[0] sr := s.Require() From 8f9cc649d0a223899f7e8d42047bb46bd3c95277 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Nov 2023 17:01:40 -0600 Subject: [PATCH 3/6] revive as well --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 5a744879..84dea2d3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -13,7 +13,7 @@ linters: - goconst - gocritic - gofumpt - - revive +# - revive # 20231120 overly sensitive unused detection - gosec - gosimple - govet From 5bfe11dfaf2197df1dde62c893d5b8948fae1f64 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Nov 2023 17:06:35 -0600 Subject: [PATCH 4/6] nix bug --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5823407a..b79a434d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: cachix/install-nix-action@v18 + - uses: cachix/install-nix-action@v20 - uses: cachix/cachix-action@v12 with: name: ethermint From ed7283e59063ebacbc79a88d00004dab1289d63c Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Nov 2023 17:15:41 -0600 Subject: [PATCH 5/6] go-bindata --- Makefile | 2 +- go.mod | 1 + go.sum | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bda401f7..6c5b09b4 100644 --- a/Makefile +++ b/Makefile @@ -237,7 +237,7 @@ endif ifeq (, $(shell which go-bindata)) @echo "Installing go-bindata..." - @go get github.com/kevinburke/go-bindata/go-bindata + @go get github.com/kevinburke/go-bindata/go-bindata@v3 else @echo "go-bindata already installed; skipping..." endif diff --git a/go.mod b/go.mod index eab4a2be..1a3ee790 100644 --- a/go.mod +++ b/go.mod @@ -134,6 +134,7 @@ require ( github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect + github.com/kevinburke/go-bindata v3.24.0+incompatible // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect github.com/klauspost/compress v1.15.11 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect diff --git a/go.sum b/go.sum index 69369469..536629fe 100644 --- a/go.sum +++ b/go.sum @@ -836,6 +836,12 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kevinburke/go-bindata v1.1.0 h1:JZ8XIdxtkAszuYkgf17qwQzcU/RgsGSVLSULJdN+5bU= +github.com/kevinburke/go-bindata v1.1.0/go.mod h1:UJ72WTOoRKzbz+vwtKgARJwsy+1ZGUukVBUCc197TJo= +github.com/kevinburke/go-bindata v3.22.0+incompatible h1:/JmqEhIWQ7GRScV0WjX/0tqBrC5D21ALg0H0U/KZ/ts= +github.com/kevinburke/go-bindata v3.22.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= +github.com/kevinburke/go-bindata v3.24.0+incompatible h1:qajFA3D0pH94OTLU4zcCCKCDgR+Zr2cZK/RPJHDdFoY= +github.com/kevinburke/go-bindata v3.24.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= From 5b2138d02fc675f33a742418970581365a38d733 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Nov 2023 21:47:05 -0600 Subject: [PATCH 6/6] Disable vulncheck in CI --- .github/workflows/dependencies.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 8ab944a1..6c2fe470 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -23,6 +23,7 @@ jobs: - name: "Dependency Review" uses: actions/dependency-review-action@v3 if: env.GIT_DIFF - - name: "Go vulnerability check" - run: make vulncheck - if: env.GIT_DIFF +# TODO: https://git.vdb.to/cerc-io/laconicd/issues/115 +# - name: "Go vulnerability check" +# run: make vulncheck +# if: env.GIT_DIFF