Closed kristovatlas closed 2 months ago
The first test expects that in this case gosec doesn't create an warning for unhandled error (see the 0 value in the assertion). The ignored errors are only flagged for a specific set of allowed functions which are more security sensitive (https://github.com/securego/gosec/blob/2ae137abcf405533ad6e549e9363e58e4f6e8b7d/rules/errors.go#L85).
Summary
The first example in testutils/g104_samples.go does not seem to be detected.
Steps to reproduce the behavior
g104.go:
gosec version
Go version (output of 'go version')
Operating system / Environment
MacOS
Expected behavior
Actual behavior
G104 not detected