Python: Stop using deprecated getName in collections taint test

This commit is contained in:
Rasmus Wriedt Larsen
2020-01-23 16:08:28 +01:00
parent 3db551d6bc
commit 5778764a48

View File

@@ -2,12 +2,10 @@ import python
import semmle.python.security.TaintTracking
import Taint
from TaintedNode n, TaintedNode s
where n.getLocation().getFile().getName().matches("%test.py") and
s.getLocation().getFile().getName().matches("%test.py") and
s = n.getASuccessor()
select
"Taint " + n.getTaintKind(), n.getLocation().toString(), n.getAstNode(), n.getContext(),
" --> ",
"Taint " + s.getTaintKind(), s.getLocation().toString(), s.getAstNode(), s.getContext()
where
n.getLocation().getFile().getShortName() = "test.py" and
s.getLocation().getFile().getShortName() = "test.py" and
s = n.getASuccessor()
select "Taint " + n.getTaintKind(), n.getLocation().toString(), n.getAstNode(), n.getContext(),
" --> ", "Taint " + s.getTaintKind(), s.getLocation().toString(), s.getAstNode(), s.getContext()