From d2204d98e2f885ebec5eb1ab8cae821760c40d0e Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Fri, 18 Aug 2023 16:56:06 +0200 Subject: [PATCH] fix: `gosec` lint issues (#997) * nosec * remove pointer reference loop --- contrib/rpctest/main.go | 1 + x/crosschain/client/querytests/intx_hash.go | 1 + x/observer/client/querytests/permission_flags.go | 1 + zetaclient/config/config_mainnet.go | 1 + 4 files changed, 4 insertions(+) diff --git a/contrib/rpctest/main.go b/contrib/rpctest/main.go index 5a74a7f874..e909c97bd3 100644 --- a/contrib/rpctest/main.go +++ b/contrib/rpctest/main.go @@ -21,6 +21,7 @@ import ( ) var ( + // #nosec ZetaEthPriv = "9D00E4D7A8A14384E01CD90B83745BCA847A66AD8797A9904A200C28C2648E64" SystemContractAddress = "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921" ) diff --git a/x/crosschain/client/querytests/intx_hash.go b/x/crosschain/client/querytests/intx_hash.go index 266dd461f1..989822aecc 100644 --- a/x/crosschain/client/querytests/intx_hash.go +++ b/x/crosschain/client/querytests/intx_hash.go @@ -60,6 +60,7 @@ func (s *CliTestSuite) TestShowInTxHashToCctx() { var resp types.QueryGetInTxHashToCctxResponse s.Require().NoError(s.network.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) s.Require().NotNil(resp.InTxHashToCctx) + tc := tc s.Require().Equal(nullify.Fill(&tc.obj), nullify.Fill(&resp.InTxHashToCctx), ) diff --git a/x/observer/client/querytests/permission_flags.go b/x/observer/client/querytests/permission_flags.go index e1de43472e..8d29273b0d 100644 --- a/x/observer/client/querytests/permission_flags.go +++ b/x/observer/client/querytests/permission_flags.go @@ -42,6 +42,7 @@ func (s *CliTestSuite) TestShowPermissionFlags() { var resp types.QueryGetPermissionFlagsResponse s.Require().NoError(s.network.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) s.Require().NotNil(resp.PermissionFlags) + tc := tc s.Require().Equal(nullify.Fill(&tc.obj), nullify.Fill(&resp.PermissionFlags), ) diff --git a/zetaclient/config/config_mainnet.go b/zetaclient/config/config_mainnet.go index 31d3b2e1a4..1622edf923 100644 --- a/zetaclient/config/config_mainnet.go +++ b/zetaclient/config/config_mainnet.go @@ -13,6 +13,7 @@ const ( ) const ( + // #nosec TssTestPrivkey = "2082bc9775d6ee5a05ef221a9d1c00b3cc3ecb274a4317acc0a182bc1e05d1bb" TssTestAddress = "0xE80B6467863EbF8865092544f441da8fD3cF6074" )