@@ -28,43 +28,43 @@ def SINK_F(x):
28
28
print ("OK" )
29
29
30
30
31
- from Foo import identity
31
+ from Foo import MS_identity
32
32
33
33
# Simple summary
34
- tainted = identity (SOURCE )
34
+ tainted = MS_identity (SOURCE )
35
35
SINK (tainted ) # $ MISSING: flow="SOURCE, l:-1 -> tainted"
36
36
37
37
# Lambda summary
38
- tainted_lambda = apply_lambda (lambda x : x + 1 , SOURCE )
38
+ tainted_lambda = MS_apply_lambda (lambda x : x + 1 , SOURCE )
39
39
SINK (tainted_lambda ) # $ MISSING: flow="SOURCE, l:-1 -> tainted_lambda"
40
40
41
41
# A lambda that breaks the flow
42
- untainted_lambda = apply_lambda (lambda x : 1 , SOURCE )
42
+ untainted_lambda = MS_apply_lambda (lambda x : 1 , SOURCE )
43
43
SINK_F (untainted_lambda )
44
44
45
45
# Collection summaries
46
- tainted_list = my_reversed ([SOURCE ])
46
+ tainted_list = MS_reversed ([SOURCE ])
47
47
SINK (tainted_list [0 ]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_list[0]"
48
48
49
49
# Complex summaries
50
50
def add_colon (x ):
51
51
return x + ":"
52
52
53
- tainted_mapped = list_map (add_colon , [SOURCE ])
53
+ tainted_mapped = MS_list_map (add_colon , [SOURCE ])
54
54
SINK (tainted_mapped [0 ]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_mapped[0]"
55
55
56
56
def explicit_identity (x ):
57
57
return x
58
58
59
- tainted_mapped_explicit = list_map (explicit_identity , [SOURCE ])
59
+ tainted_mapped_explicit = MS_list_map (explicit_identity , [SOURCE ])
60
60
SINK (tainted_mapped_explicit [0 ]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_mapped_explicit[0]"
61
61
62
- tainted_mapped_summary = list_map ( identity , [SOURCE ])
62
+ tainted_mapped_summary = MS_list_map ( MS_identity , [SOURCE ])
63
63
SINK (tainted_mapped_summary [0 ]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_mapped_summary[0]"
64
64
65
- tainted_list = append_to_list ([], SOURCE )
65
+ tainted_list = MS_append_to_list ([], SOURCE )
66
66
SINK (tainted_list [0 ]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_list[0]"
67
67
68
- from json import my_loads as json_loads
68
+ from json import MS_loads as json_loads
69
69
tainted_resultlist = json_loads (SOURCE )
70
70
SINK (tainted_resultlist [0 ]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_resultlist[0]"
0 commit comments