Skip to content

Commit 1933cba

Browse files
authored
Add os.Unsetenv to NoErrorCheck whitelist (#702)
it always return nil err
1 parent e73248c commit 1933cba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rules/errors.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ func NewNoErrorCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
8787
whitelist.AddAll("strings.Builder", "Write", "WriteByte", "WriteRune", "WriteString")
8888
whitelist.Add("io.PipeWriter", "CloseWithError")
8989
whitelist.Add("hash.Hash", "Write")
90+
whitelist.Add("os", "Unsetenv")
9091

9192
if configured, ok := conf["G104"]; ok {
9293
if whitelisted, ok := configured.(map[string]interface{}); ok {

0 commit comments

Comments
 (0)