diff --git a/rules/errors.go b/rules/errors.go index f16f91d..7a34bc6 100644 --- a/rules/errors.go +++ b/rules/errors.go @@ -86,6 +86,7 @@ func NewNoErrorCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) { whitelist.AddAll("fmt", "Print", "Printf", "Println", "Fprint", "Fprintf", "Fprintln") whitelist.AddAll("strings.Builder", "Write", "WriteByte", "WriteRune", "WriteString") whitelist.Add("io.PipeWriter", "CloseWithError") + whitelist.Add("hash.Hash", "Write") if configured, ok := conf["G104"]; ok { if whitelisted, ok := configured.(map[string]interface{}); ok {