mirror of
https://github.com/securego/gosec.git
synced 2024-12-24 11:35:52 +00:00
Add os.Unsetenv to NoErrorCheck whitelist (#702)
it always return nil err
This commit is contained in:
parent
e73248cc12
commit
1933cba5b5
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue