Added filepath.Abs as a sanitizer (#1643)

it calls Clean internally per Go docs.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
This commit is contained in:
Cosmin Cojocar
2026-04-23 15:25:57 +02:00
committed by GitHub
parent 87bdc09bee
commit 24ee992e95
2 changed files with 17 additions and 0 deletions
+2
View File
@@ -65,6 +65,8 @@ func PathTraversal() taint.Config {
Sanitizers: []taint.Sanitizer{
// filepath.Clean normalizes and removes traversal components
{Package: "path/filepath", Method: "Clean"},
// filepath.Abs calls Clean internally (per Go docs)
{Package: "path/filepath", Method: "Abs"},
// filepath.Base extracts just the filename, removing directory traversal
{Package: "path/filepath", Method: "Base"},
// filepath.Rel computes a relative path safely