mirror of
https://github.com/securego/gosec.git
synced 2025-11-25 22:22:17 +02:00
Find G303 with filepath.Join'd temp dirs (#754)
This commit is contained in:
@@ -71,6 +71,7 @@ func NewBadTempFile(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
|
||||
argCalls.Add("os", "TempDir")
|
||||
nestedCalls := gosec.NewCallList()
|
||||
nestedCalls.Add("path", "Join")
|
||||
nestedCalls.Add("path/filepath", "Join")
|
||||
return &badTempFile{
|
||||
calls: calls,
|
||||
args: regexp.MustCompile(`^(/(usr|var))?/tmp(/.*)?$`),
|
||||
|
||||
Reference in New Issue
Block a user