22import os
33
44# Simple summary
5- tainted = identity (tracked ) # $ tracked
5+ tainted = TTS_identity (tracked ) # $ tracked
66tainted # $ tracked
77
88# Lambda summary
99# I think the missing result is expected because type tracking
1010# is not allowed to flow back out of a call.
11- tainted_lambda = apply_lambda (lambda x : x , tracked ) # $ tracked
11+ tainted_lambda = TTS_apply_lambda (lambda x : x , tracked ) # $ tracked
1212tainted_lambda # $ MISSING: tracked
1313
1414# A lambda that directly introduces taint
15- bad_lambda = apply_lambda (lambda x : tracked , 1 ) # $ tracked
15+ bad_lambda = TTS_apply_lambda (lambda x : tracked , 1 ) # $ tracked
1616bad_lambda # $ tracked
1717
1818# A lambda that breaks the flow
19- untainted_lambda = apply_lambda (lambda x : 1 , tracked ) # $ tracked
19+ untainted_lambda = TTS_apply_lambda (lambda x : 1 , tracked ) # $ tracked
2020untainted_lambda
2121
2222# Collection summaries
23- tainted_list = reversed ([tracked ]) # $ tracked
23+ tainted_list = TTS_reversed ([tracked ]) # $ tracked
2424tl = tainted_list [0 ]
2525tl # $ MISSING: tracked
2626
2727# Complex summaries
2828def add_colon (x ):
2929 return x + ":"
3030
31- tainted_mapped = list_map (add_colon , [tracked ]) # $ tracked
31+ tainted_mapped = TTS_list_map (add_colon , [tracked ]) # $ tracked
3232tm = tainted_mapped [0 ]
3333tm # $ MISSING: tracked
3434
3535def explicit_identity (x ):
3636 return x
3737
38- tainted_mapped_explicit = list_map (explicit_identity , [tracked ]) # $ tracked
38+ tainted_mapped_explicit = TTS_list_map (explicit_identity , [tracked ]) # $ tracked
3939tainted_mapped_explicit [0 ] # $ MISSING: tracked
4040
41- tainted_mapped_summary = list_map (identity , [tracked ]) # $ tracked
41+ tainted_mapped_summary = TTS_list_map (identity , [tracked ]) # $ tracked
4242tms = tainted_mapped_summary [0 ]
4343tms # $ MISSING: tracked
4444
45- another_tainted_list = append_to_list ([], tracked ) # $ tracked
45+ another_tainted_list = TTS_append_to_list ([], tracked ) # $ tracked
4646atl = another_tainted_list [0 ]
4747atl # $ MISSING: tracked
4848
@@ -53,9 +53,9 @@ def explicit_identity(x):
5353tr # $ MISSING: tracked
5454
5555x .secret = tracked # $ tracked=secret tracked
56- r = read_secret (x ) # $ tracked=secret tracked
56+ r = TTS_read_secret (x ) # $ tracked=secret tracked
5757r # $ tracked
5858
5959y # $ tracked=secret
60- set_secret (y , tracked ) # $ tracked tracked=secret
60+ TTS_set_secret (y , tracked ) # $ tracked tracked=secret
6161y .secret # $ tracked tracked=secret
0 commit comments