Пример #1
0
def obscure_test(obj):
    return type(obj)(__test_source())
Пример #2
0
def create_zipped_source_with_all_tainted():
    x = [__test_source()]
    y = [__test_source()]
    z = [__test_source()]
    return zip(x, y, z)
Пример #3
0
def partial_application_with_tainted():
    x = __test_source()
    partial(a_flows_to_sink, x)
Пример #4
0
def test():
    query = {"json": __test_source()}
    sink(query)
Пример #5
0
def test():
    client.get_instance().offer(__test_source())
Пример #6
0
def source_via_format():
    taint = __test_source()
    return f"{taint} is bad"
Пример #7
0
def first_index_numeric():
    x = __test_source()
    return x[0]
Пример #8
0
def float_source() -> float:
    return __test_source()
Пример #9
0
def bool_source() -> bool:
    return __test_source()
Пример #10
0
def local_function_with_method_sink(c: C):
    f = c.m
    x = __test_source()
    c.m(x)
    f(x)
Пример #11
0
def issue_via_in():
    o = __test_source()
    __test_sink("a" in o)
    __test_sink(o in "a")
Пример #12
0
def foo_as_local():
    x = __test_source()
    f = foo
    foo(x)
    f(x)
Пример #13
0
 def also_tainted_but_missing_from_analysis():
     return __test_source()
Пример #14
0
 def foo():
     return __test_source()
Пример #15
0
 def writes_to_property(self):
     self.my_property = __test_source()
Пример #16
0
def int_source() -> int:
    return __test_source()
Пример #17
0
def sets_tainted_value(t: TaintedGetterAndSetter) -> None:
    t.my_property = __test_source()
Пример #18
0
def issue_via_bool():
    o = __test_source()
    x = bool(o)
    __test_sink(x)
Пример #19
0
def first_index():
    x = __test_source()
    return x["access_token"]
Пример #20
0
def returns_tainted_object() -> object:
    return __test_source()
Пример #21
0
def first_index_unknown():
    x = __test_source()
    unknown = "some text"
    return x[unknown]
Пример #22
0
async def async_tuple_of_bools() -> Tuple[bool, bool]:
    return __test_source(), __test_source()
Пример #23
0
def bar():
    Test.foo(__test_source())
Пример #24
0
 def uses_property(self):
     self.tainted = __test_source()
     return self.my_property
Пример #25
0
def create_zipped_source():
    x = [__test_source(), 1]
    y = [2, 3]
    return zip(x, y)
Пример #26
0
 def my_property(self) -> str:
     return __test_source()
Пример #27
0
def main() -> None:
    foo(__test_source())
    foo_with_sink(__test_source())
    await foo_async(__test_source())
Пример #28
0
 def uses_property_but_no_tito_taint(self):
     self.untainted = __test_source()
     return self.my_property
Пример #29
0
def partial_application_with_named_b():
    x = __test_source()
    partial(a_flows_to_sink, b=x)
Пример #30
0
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"])