gosec
gosec copied to clipboard
Add detection of overflow during integer conversion
Summary
G109 provides detection of overflow during strconv.Atoi, but there seems to be no good way to detect the more common conversions between integers, such as uint32 to int32.
Steps to reproduce the behavior
gosec version
Go version (output of 'go version')
Operating system / Environment
Expected behavior
Actual behavior
This is a good addition. I was also thinking about a rule to detect this conversions which can lead to overflows.