File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
python/ql/test/experimental/dataflow Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -66,3 +66,21 @@ def explicit_identity(x):
66
66
from json import loads as json_loads
67
67
tainted_resultlist = json_loads (SOURCE )
68
68
SINK (tainted_resultlist [0 ]) # $ flow="SOURCE, l:-1 -> tainted_resultlist[0]"
69
+
70
+
71
+ # Class methods are not handled right now
72
+
73
+ class MyClass :
74
+ @staticmethod
75
+ def foo (x ):
76
+ return x
77
+
78
+ def bar (self , x ):
79
+ return x
80
+
81
+ through_staticmethod = apply_lambda (MyClass .foo , SOURCE )
82
+ through_staticmethod # $ MISSING: flow
83
+
84
+ mc = MyClass ()
85
+ through_method = apply_lambda (mc .bar , SOURCE )
86
+ through_method # $ MISSING: flow
Original file line number Diff line number Diff line change @@ -59,3 +59,20 @@ def explicit_identity(x):
59
59
y # $ tracked=secret
60
60
TTS_set_secret (y , tracked ) # $ tracked tracked=secret
61
61
y .secret # $ tracked tracked=secret
62
+
63
+ # Class methods are not handled right now
64
+
65
+ class MyClass :
66
+ @staticmethod
67
+ def foo (x ):
68
+ return x
69
+
70
+ def bar (self , x ):
71
+ return x
72
+
73
+ through_staticmethod = TTS_apply_lambda (MyClass .foo , tracked ) # $ tracked
74
+ through_staticmethod # $ MISSING: tracked
75
+
76
+ mc = MyClass ()
77
+ through_method = TTS_apply_lambda (mc .bar , tracked ) # $ tracked
78
+ through_method # $ MISSING: tracked
You can’t perform that action at this time.
0 commit comments