Skip to content

Commit

Permalink
Add filepath.EvalSymlinks to clean functions in rule G304
Browse files Browse the repository at this point in the history
Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
  • Loading branch information
ccojocar committed May 13, 2024
1 parent d34f8b7 commit 417a44c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rules/readfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func NewReadFile(id string, _ gosec.Config) (gosec.Rule, []ast.Node) {
rule.pathJoin.Add("path", "Join")
rule.clean.Add("path/filepath", "Clean")
rule.clean.Add("path/filepath", "Rel")
rule.clean.Add("path/filepath", "EvalSymlinks")
rule.Add("io/ioutil", "ReadFile")
rule.Add("os", "ReadFile")
rule.Add("os", "Open")
Expand Down

0 comments on commit 417a44c

Please sign in to comment.