Skip to content

Commit 2296410

Browse files
committed
python: rename summaries
1 parent 6554e80 commit 2296410

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

python/ql/test/experimental/dataflow/model-summaries/model_summaries.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,43 +28,43 @@ def SINK_F(x):
2828
print("OK")
2929

3030

31-
from Foo import identity
31+
from Foo import MS_identity
3232

3333
# Simple summary
34-
tainted = identity(SOURCE)
34+
tainted = MS_identity(SOURCE)
3535
SINK(tainted) # $ MISSING: flow="SOURCE, l:-1 -> tainted"
3636

3737
# Lambda summary
38-
tainted_lambda = apply_lambda(lambda x: x + 1, SOURCE)
38+
tainted_lambda = MS_apply_lambda(lambda x: x + 1, SOURCE)
3939
SINK(tainted_lambda) # $ MISSING: flow="SOURCE, l:-1 -> tainted_lambda"
4040

4141
# 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)
4343
SINK_F(untainted_lambda)
4444

4545
# Collection summaries
46-
tainted_list = my_reversed([SOURCE])
46+
tainted_list = MS_reversed([SOURCE])
4747
SINK(tainted_list[0]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_list[0]"
4848

4949
# Complex summaries
5050
def add_colon(x):
5151
return x + ":"
5252

53-
tainted_mapped = list_map(add_colon, [SOURCE])
53+
tainted_mapped = MS_list_map(add_colon, [SOURCE])
5454
SINK(tainted_mapped[0]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_mapped[0]"
5555

5656
def explicit_identity(x):
5757
return x
5858

59-
tainted_mapped_explicit = list_map(explicit_identity, [SOURCE])
59+
tainted_mapped_explicit = MS_list_map(explicit_identity, [SOURCE])
6060
SINK(tainted_mapped_explicit[0]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_mapped_explicit[0]"
6161

62-
tainted_mapped_summary = list_map(identity, [SOURCE])
62+
tainted_mapped_summary = MS_list_map(MS_identity, [SOURCE])
6363
SINK(tainted_mapped_summary[0]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_mapped_summary[0]"
6464

65-
tainted_list = append_to_list([], SOURCE)
65+
tainted_list = MS_append_to_list([], SOURCE)
6666
SINK(tainted_list[0]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_list[0]"
6767

68-
from json import my_loads as json_loads
68+
from json import MS_loads as json_loads
6969
tainted_resultlist = json_loads(SOURCE)
7070
SINK(tainted_resultlist[0]) # $ MISSING: flow="SOURCE, l:-1 -> tainted_resultlist[0]"

0 commit comments

Comments
 (0)