mirror of
https://github.com/securego/gosec.git
synced 2025-03-17 20:57:54 +02:00
Add os.Unsetenv to NoErrorCheck whitelist (#702)
it always return nil err
This commit is contained in:
parent
e73248cc12
commit
1933cba5b5
@ -87,6 +87,7 @@ func NewNoErrorCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
|
||||
whitelist.AddAll("strings.Builder", "Write", "WriteByte", "WriteRune", "WriteString")
|
||||
whitelist.Add("io.PipeWriter", "CloseWithError")
|
||||
whitelist.Add("hash.Hash", "Write")
|
||||
whitelist.Add("os", "Unsetenv")
|
||||
|
||||
if configured, ok := conf["G104"]; ok {
|
||||
if whitelisted, ok := configured.(map[string]interface{}); ok {
|
||||
|
Loading…
x
Reference in New Issue
Block a user