Python: Add taint test for os.path.join

Surprisingly the first two just worked, due to our very general handling of any
`join` methods :D
This commit is contained in:
Rasmus Wriedt Larsen
2020-09-30 11:16:15 +02:00
parent aa6fad558c
commit efa2484718
3 changed files with 16 additions and 1 deletions

View File

@@ -101,7 +101,7 @@ predicate stringManipulation(DataFlow::CfgNode nodeFrom, DataFlow::CfgNode nodeT
nodeFrom.getNode() = object and
method_name in ["partition", "rpartition", "rsplit", "split", "splitlines"]
or
// List[str] -> str
// Iterable[str] -> str
// TODO: check if these should be handled differently in regards to content
method_name = "join" and
nodeFrom.getNode() = call.getArg(0)