Add 2 more cases

This commit is contained in:
Joe Farebrother
2024-11-20 11:22:42 +00:00
parent 9b4b01a442
commit 52cd7f2c5c

View File

@@ -85,4 +85,34 @@ def baz7(loc_foo):
threading.Thread(target=bar7).start()
baz7(foo7)
baz7(foo7)
# Test 8
# FN - Flow is also *not* found in the above case through a direct call
foo8 = []
def bar8():
time.sleep(1)
ensure_tainted(foo8[0]) # $MISSING: tainted
def baz8(loc_foo):
loc_foo.append(TAINTED_STRING)
baz8(foo8)
bar8()
# Test 9
# TP - Flow is found in the above case when the variable is captured rather than global
def test9():
foo9 = []
def bar9():
time.sleep(1)
ensure_tainted(foo9[0]) # $tainted
def baz9(loc_foo):
loc_foo.append(TAINTED_STRING)
baz9(foo9)
bar9()