Remove redundant tests.

This commit is contained in:
Mark Shannon
2019-04-17 13:04:35 +01:00
parent 4145b19671
commit 2aa967ae8e
8 changed files with 32 additions and 58 deletions

View File

@@ -1,9 +0,0 @@
| test.py:10 ... fail
| test.py:11:5:11:7 | ControlFlowNode for Attribute | bound method 'm' of instance of C | test.py:11:5:11:7 | ControlFlowNode for Attribute |
| test.py:12:5:12:10 | ControlFlowNode for Attribute() | 3 | test.py:12:9:12:9 | ControlFlowNode for IntegerLiteral |
| test.py:16:5:16:5 | ControlFlowNode for t | bound method 'm' of instance of C | test.py:15:9:15:11 | ControlFlowNode for Attribute |
| test.py:17:5:17:8 | ControlFlowNode for t() | 4 | test.py:17:7:17:7 | ControlFlowNode for IntegerLiteral |
| test.py:24:1:24:1 | ControlFlowNode for D | class D | test.py:19:1:19:16 | ControlFlowNode for ClassExpr |
| test.py:25 ... fail
| test.py:26 ... fail
| test.py:27 ... fail

View File

@@ -1,10 +0,0 @@
import python
import semmle.python.pointsto.PointsTo2
import semmle.python.objects.ObjectInternal
from ControlFlowNode f, ObjectInternal obj, ControlFlowNode orig
where exists(ExprStmt s | s.getValue().getAFlowNode() = f) and
PointsTo2::points_to(f, _, obj, orig)
select f, obj.toString(), orig

View File

@@ -1,27 +0,0 @@
class C(object):
def m(self, arg1):
return arg1
c = C()
def func_and_method():
C.m
c.m
c.m(3)
def flow_bound_method():
t = c.m
t
t(4)
class D(object):
@staticmethod
def foo(arg):
return arg
D
D.foo
D.foo(1)
D().foo(2)

View File

@@ -0,0 +1 @@
fail

View File

@@ -0,0 +1,9 @@
import python
import Util
from ControlFlowNode f, Context ctx, Value v, ControlFlowNode origin
where
f.pointsTo(ctx, v, origin)
select locate(f.getLocation(), "c"), f.toString(), ctx, v, v.getClass()

View File

@@ -3,7 +3,7 @@ import semmle.python.security.TaintTest
import TaintLib
from ModuleObject m, string name, TaintedNode origin
from ModuleValue m, string name, TaintedNode origin
where TaintFlowTest::module_attribute_tainted(m, name, origin)