Documentation ¶
Index ¶
- func NewBlocklistedImports(id string, conf gosec.Config, blocklist map[string]string) (gosec.Rule, []ast.Node)
- func NewErrorNotPropagated(id string, conf gosec.Config) (gosec.Rule, []ast.Node)
- func NewIntegerCast(id string, conf gosec.Config) (gosec.Rule, []ast.Node)
- func NewMapRangingCheck(id string, config gosec.Config) (rule gosec.Rule, nodes []ast.Node)
- func NewStrconvIntBitSizeOverflow(id string, config gosec.Config) (rule gosec.Rule, nodes []ast.Node)
- func NewUnsafeImport(id string, conf gosec.Config) (gosec.Rule, []ast.Node)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBlocklistedImports ¶
func NewBlocklistedImports(id string, conf gosec.Config, blocklist map[string]string) (gosec.Rule, []ast.Node)
NewBlocklistedImports reports when a blocklisted import is being used. Typically when a deprecated technology is being used.
func NewErrorNotPropagated ¶
NewErrorNotPropagated detects if a returned error is not propagated up the stack.
func NewIntegerCast ¶
NewIntegerCast detects if there is potential Integer OverFlow
func NewMapRangingCheck ¶
NewMapRangingCheck returns an error if a map is being iterated over in a for loop outside of the context of keys being retrieved for sorting, or the delete map clearing idiom.
func NewStrconvIntBitSizeOverflow ¶
func NewStrconvIntBitSizeOverflow(id string, config gosec.Config) (rule gosec.Rule, nodes []ast.Node)
NewStrconvIntBitSizeOverflow returns an error if a constant bitSize is used for a cast signed value that was retrieved from strconv.ParseUint.
func NewUnsafeImport ¶
NewUnsafeImport fails if any of "unsafe", "reflect", "crypto/rand", "math/rand" are imported.
Types ¶
This section is empty.