python: remove explicit steps

copy, pop, get, popitem
This commit is contained in:
Rasmus Lerchedahl Petersen
2023-05-17 16:51:09 +02:00
parent 05f3934042
commit 8d4f9447b1
30 changed files with 73 additions and 615 deletions

View File

@@ -190,14 +190,9 @@ predicate containerStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
call.getArg(0) = nodeFrom
)
or
// methods
// dict methods
exists(DataFlow::MethodCallNode call, string methodName | call = nodeTo |
methodName in [
// general
"copy", "pop",
// dict
"values", "items", "get", "popitem"
] and
methodName in ["values", "items"] and
call.calls(nodeFrom, methodName)
)
or