Python taint-tracking: Don't track strings through json.decode().

This commit is contained in:
Mark Shannon
2019-06-03 15:53:36 +01:00
parent 6a79e0aaa7
commit fc2ac891f8

View File

@@ -81,6 +81,7 @@ private predicate str_format(ControlFlowNode fromnode, CallNode tonode) {
/* tonode = codec.[en|de]code(fromnode)*/
private predicate encode_decode(ControlFlowNode fromnode, CallNode tonode) {
exists(FunctionObject func, string name |
not func.getFunction().isMethod() and
func.getACall() = tonode and
tonode.getAnArg() = fromnode and
func.getName() = name |