mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 03:55:54 +00:00
whitelist strings.Builder method in rule G104
This commit is contained in:
parent
9b966a447e
commit
adb42220da
1 changed files with 1 additions and 0 deletions
|
@ -81,6 +81,7 @@ func NewNoErrorCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
|
|||
whitelist := gosec.NewCallList()
|
||||
whitelist.AddAll("bytes.Buffer", "Write", "WriteByte", "WriteRune", "WriteString")
|
||||
whitelist.AddAll("fmt", "Print", "Printf", "Println", "Fprint", "Fprintf", "Fprintln")
|
||||
whitelist.AddAll("strings.Builder", "Write", "WriteByte", "WriteRune", "WriteString")
|
||||
whitelist.Add("io.PipeWriter", "CloseWithError")
|
||||
|
||||
if configured, ok := conf["G104"]; ok {
|
||||
|
|
Loading…
Reference in a new issue