mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
python: format
This commit is contained in:
@@ -54,7 +54,7 @@ SINK(via_reversed[0]) # $ flow="SOURCE, l:-1 -> via_reversed[0]"
|
|||||||
tainted_list = MS_reversed(TAINTED_LIST)
|
tainted_list = MS_reversed(TAINTED_LIST)
|
||||||
ensure_tainted(
|
ensure_tainted(
|
||||||
tainted_list, # $ tainted
|
tainted_list, # $ tainted
|
||||||
tainted_list[0] # $ tainted
|
tainted_list[0], # $ tainted
|
||||||
)
|
)
|
||||||
|
|
||||||
# Complex summaries
|
# Complex summaries
|
||||||
@@ -67,7 +67,7 @@ SINK(via_map[0][0]) # $ flow="SOURCE, l:-1 -> via_map[0][0]"
|
|||||||
tainted_mapped = MS_list_map(box, TAINTED_LIST)
|
tainted_mapped = MS_list_map(box, TAINTED_LIST)
|
||||||
ensure_tainted(
|
ensure_tainted(
|
||||||
tainted_mapped, # $ tainted
|
tainted_mapped, # $ tainted
|
||||||
tainted_mapped[0][0] # $ tainted
|
tainted_mapped[0][0], # $ tainted
|
||||||
)
|
)
|
||||||
|
|
||||||
def explicit_identity(x):
|
def explicit_identity(x):
|
||||||
@@ -79,7 +79,7 @@ SINK(via_map_explicit[0]) # $ flow="SOURCE, l:-1 -> via_map_explicit[0]"
|
|||||||
tainted_mapped_explicit = MS_list_map(explicit_identity, TAINTED_LIST)
|
tainted_mapped_explicit = MS_list_map(explicit_identity, TAINTED_LIST)
|
||||||
ensure_tainted(
|
ensure_tainted(
|
||||||
tainted_mapped_explicit, # $ tainted
|
tainted_mapped_explicit, # $ tainted
|
||||||
tainted_mapped_explicit[0] # $ tainted
|
tainted_mapped_explicit[0], # $ tainted
|
||||||
)
|
)
|
||||||
|
|
||||||
via_map_summary = MS_list_map(MS_identity, [SOURCE])
|
via_map_summary = MS_list_map(MS_identity, [SOURCE])
|
||||||
@@ -88,7 +88,7 @@ SINK(via_map_summary[0]) # $ flow="SOURCE, l:-1 -> via_map_summary[0]"
|
|||||||
tainted_mapped_summary = MS_list_map(MS_identity, TAINTED_LIST)
|
tainted_mapped_summary = MS_list_map(MS_identity, TAINTED_LIST)
|
||||||
ensure_tainted(
|
ensure_tainted(
|
||||||
tainted_mapped_summary, # $ tainted
|
tainted_mapped_summary, # $ tainted
|
||||||
tainted_mapped_summary[0] # $ tainted
|
tainted_mapped_summary[0], # $ tainted
|
||||||
)
|
)
|
||||||
|
|
||||||
via_append_el = MS_append_to_list([], SOURCE)
|
via_append_el = MS_append_to_list([], SOURCE)
|
||||||
@@ -97,7 +97,7 @@ SINK(via_append_el[0]) # $ flow="SOURCE, l:-1 -> via_append_el[0]"
|
|||||||
tainted_list_el = MS_append_to_list([], TAINTED_STRING)
|
tainted_list_el = MS_append_to_list([], TAINTED_STRING)
|
||||||
ensure_tainted(
|
ensure_tainted(
|
||||||
tainted_list_el, # $ tainted
|
tainted_list_el, # $ tainted
|
||||||
tainted_list_el[0] # $ tainted
|
tainted_list_el[0], # $ tainted
|
||||||
)
|
)
|
||||||
|
|
||||||
via_append = MS_append_to_list([SOURCE], NONSOURCE)
|
via_append = MS_append_to_list([SOURCE], NONSOURCE)
|
||||||
@@ -106,7 +106,7 @@ SINK(via_append[0]) # $ flow="SOURCE, l:-1 -> via_append[0]"
|
|||||||
tainted_list_implicit = MS_append_to_list(TAINTED_LIST, NONSOURCE)
|
tainted_list_implicit = MS_append_to_list(TAINTED_LIST, NONSOURCE)
|
||||||
ensure_tainted(
|
ensure_tainted(
|
||||||
tainted_list, # $ tainted
|
tainted_list, # $ tainted
|
||||||
tainted_list[0] # $ tainted
|
tainted_list[0], # $ tainted
|
||||||
)
|
)
|
||||||
|
|
||||||
# Modeled flow-summary is not value preserving
|
# Modeled flow-summary is not value preserving
|
||||||
@@ -120,5 +120,5 @@ SINK_F(json_loads(SOURCE)[0])
|
|||||||
tainted_resultlist = json_loads(TAINTED_STRING)
|
tainted_resultlist = json_loads(TAINTED_STRING)
|
||||||
ensure_tainted(
|
ensure_tainted(
|
||||||
tainted_resultlist, # $ tainted
|
tainted_resultlist, # $ tainted
|
||||||
tainted_resultlist[0] # $ tainted
|
tainted_resultlist[0], # $ tainted
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user