mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
PY: update tests to not use deleted deprecations
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
WARNING: Predicate ssa_variable_points_to has been deprecated and may be removed in future (SSA.ql:10,3-35)
|
||||
| __init__.py:0 | __name___0 = ScopeEntryDefinition | 'code' | builtin-class str |
|
||||
| __init__.py:0 | __name___0 = ScopeEntryDefinition | 'code.package' | builtin-class str |
|
||||
| __init__.py:0 | __name___0 = ScopeEntryDefinition | 'code.test_package' | builtin-class str |
|
||||
|
||||
@@ -3,10 +3,21 @@ private import semmle.python.pointsto.PointsTo
|
||||
private import semmle.python.pointsto.PointsToContext
|
||||
import Util
|
||||
|
||||
predicate ssa_variable_points_to(
|
||||
EssaVariable var, PointsToContext context, Object obj, ClassObject cls, @py_object origin
|
||||
) {
|
||||
exists(ObjectInternal value |
|
||||
PointsToInternal::variablePointsTo(var, context, value, origin) and
|
||||
cls = value.getClass().getSource()
|
||||
|
|
||||
obj = value.getSource()
|
||||
)
|
||||
}
|
||||
|
||||
from EssaVariable v, EssaDefinition def, Object o, ClassObject cls
|
||||
where
|
||||
def = v.getDefinition() and
|
||||
not v.getSourceVariable() instanceof SpecialSsaSourceVariable and
|
||||
PointsTo::ssa_variable_points_to(v, _, o, cls, _)
|
||||
ssa_variable_points_to(v, _, o, cls, _)
|
||||
select locate(def.getLocation(), "abcdegjqmns_"),
|
||||
v.getRepresentation() + " = " + def.getRepresentation(), repr(o), repr(cls)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
WARNING: Predicate getNode has been deprecated and may be removed in future (TestStep.ql:6,77-84)
|
||||
WARNING: Predicate getNode has been deprecated and may be removed in future (TestStep.ql:8,15-22)
|
||||
| Taint simple.test | visitor.py:10 | arg | p2 = simple.test | --> | Taint simple.test | visitor.py:13 | arg | p2 = simple.test |
|
||||
| Taint simple.test | visitor.py:18 | arg | | --> | Taint simple.test | visitor.py:19 | arg | |
|
||||
| Taint simple.test | visitor.py:19 | arg | | --> | Taint simple.test | visitor.py:26 | Attribute() | |
|
||||
|
||||
@@ -3,6 +3,6 @@ import ExtensionsLib
|
||||
|
||||
from TaintedNode n, TaintedNode s
|
||||
where s = n.getASuccessor()
|
||||
select "Taint " + n.getTaintKind(), n.getLocation().toString(), n.getNode().getNode().toString(),
|
||||
select "Taint " + n.getTaintKind(), n.getLocation().toString(), n.getNode().asAstNode().toString(),
|
||||
n.getContext(), " --> ", "Taint " + s.getTaintKind(), s.getLocation().toString(),
|
||||
s.getNode().getNode().toString(), s.getContext()
|
||||
s.getNode().asAstNode().toString(), s.getContext()
|
||||
|
||||
Reference in New Issue
Block a user