From c622da6687e9ddd839b458499620fb11ce4ca717 Mon Sep 17 00:00:00 2001 From: Dave Enyeart Date: Wed, 11 Sep 2024 09:05:22 -0400 Subject: [PATCH] Fix gosec failures on integer conversion (#206) New versions of gosec implemented stricter type conversion and bounds checks. This conversion is not vulnerable so we can suppress the warning. Signed-off-by: David Enyeart Signed-off-by: Shoaeb Jindani --- pkg/initializer/orderer/configtx/encoder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/initializer/orderer/configtx/encoder.go b/pkg/initializer/orderer/configtx/encoder.go index 12745b91..be8300e0 100644 --- a/pkg/initializer/orderer/configtx/encoder.go +++ b/pkg/initializer/orderer/configtx/encoder.go @@ -81,7 +81,7 @@ func NewApplicationOrgGroup(conf *Organization) (*cb.ConfigGroup, error) { for _, anchorPeer := range conf.AnchorPeers { anchorProtos = append(anchorProtos, &pb.AnchorPeer{ Host: anchorPeer.Host, - Port: int32(anchorPeer.Port), + Port: int32(anchorPeer.Port), // #nosec G115 }) }