CodeQL library for Go
codeql/go-all 0.7.15-dev (changelog, source)
Search

Predicate isSourceWithBitSize

Holds if source is the result of a call to strconv.Atoi, strconv.ParseInt, or strconv.ParseUint, bitSize is the bitSize argument to that call (or 0 for strconv.Atoi) and hence must be between 0 and 64, and isSigned is true for strconv.Atoi, true for strconv.ParseInt and false for strconv.ParseUint.

Import path

import semmle.go.security.IncorrectIntegerConversionLib
predicate isSourceWithBitSize(Node source, int bitSize, boolean isSigned)