Skip to content

Commit 3c230ac

Browse files
authored
errors.go: add Hash.Write() to the white list. (#648)
1 parent e72b1e5 commit 3c230ac

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
@@ -86,6 +86,7 @@ func NewNoErrorCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
8686
whitelist.AddAll("fmt", "Print", "Printf", "Println", "Fprint", "Fprintf", "Fprintln")
8787
whitelist.AddAll("strings.Builder", "Write", "WriteByte", "WriteRune", "WriteString")
8888
whitelist.Add("io.PipeWriter", "CloseWithError")
89+
whitelist.Add("hash.Hash", "Write")
8990

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

0 commit comments

Comments
 (0)