示例#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"])