1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-25 22:22:17 +02:00

Add G204 rule for sys/execabs (#660)

* Add G204 rule for sys/execabs

* syntax error in testutils/sources.go
This commit is contained in:
Josh Kaufman
2021-07-01 11:43:25 -04:00
committed by GitHub
parent e936c84a90
commit 514f65f3c3
2 changed files with 20 additions and 0 deletions

View File

@@ -81,5 +81,7 @@ func NewSubproc(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
rule.Add("syscall", "Exec")
rule.Add("syscall", "ForkExec")
rule.Add("syscall", "StartProcess")
rule.Add("golang.org/x/sys/execabs", "Command")
rule.Add("golang.org/x/sys/execabs", "CommandContext")
return rule, []ast.Node{(*ast.CallExpr)(nil)}
}