Skip to content

Commit

Permalink
Fix gosec failures on integer conversion (hyperledger-labs#206)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Shoaeb Jindani <[email protected]>
  • Loading branch information
denyeart authored and Shoaeb Jindani committed Sep 20, 2024
1 parent 22d57c5 commit c622da6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/initializer/orderer/configtx/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}

Expand Down

0 comments on commit c622da6

Please sign in to comment.