Skip to content

Commit

Permalink
Fix gosec failures on integer conversion
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]>
  • Loading branch information
denyeart committed Sep 10, 2024
1 parent 252aca8 commit 78f46c4
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 78f46c4

Please sign in to comment.