def obscure_test(obj): return type(obj)(__test_source())
def create_zipped_source_with_all_tainted(): x = [__test_source()] y = [__test_source()] z = [__test_source()] return zip(x, y, z)
def partial_application_with_tainted(): x = __test_source() partial(a_flows_to_sink, x)
def test(): query = {"json": __test_source()} sink(query)
def test(): client.get_instance().offer(__test_source())
def source_via_format(): taint = __test_source() return f"{taint} is bad"
def first_index_numeric(): x = __test_source() return x[0]
def float_source() -> float: return __test_source()
def bool_source() -> bool: return __test_source()
def local_function_with_method_sink(c: C): f = c.m x = __test_source() c.m(x) f(x)
def issue_via_in(): o = __test_source() __test_sink("a" in o) __test_sink(o in "a")
def foo_as_local(): x = __test_source() f = foo foo(x) f(x)
def also_tainted_but_missing_from_analysis(): return __test_source()
def foo(): return __test_source()
def writes_to_property(self): self.my_property = __test_source()
def int_source() -> int: return __test_source()
def sets_tainted_value(t: TaintedGetterAndSetter) -> None: t.my_property = __test_source()
def issue_via_bool(): o = __test_source() x = bool(o) __test_sink(x)
def first_index(): x = __test_source() return x["access_token"]
def returns_tainted_object() -> object: return __test_source()
def first_index_unknown(): x = __test_source() unknown = "some text" return x[unknown]
async def async_tuple_of_bools() -> Tuple[bool, bool]: return __test_source(), __test_source()
def bar(): Test.foo(__test_source())
def uses_property(self): self.tainted = __test_source() return self.my_property
def create_zipped_source(): x = [__test_source(), 1] y = [2, 3] return zip(x, y)
def my_property(self) -> str: return __test_source()
def main() -> None: foo(__test_source()) foo_with_sink(__test_source()) await foo_async(__test_source())
def uses_property_but_no_tito_taint(self): self.untainted = __test_source() return self.my_property
def partial_application_with_named_b(): x = __test_source() partial(a_flows_to_sink, b=x)
def test_attribute_via_dunder_dict(): obj = UseViaDict(a=__test_source(), b=None) # First two should be flows, and the third shouldn't. __test_sink(obj.__dict__) __test_sink(obj.__dict__["a"]) __test_sink(obj.__dict__["b"])