コード例 #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
ファイル: partial.py プロジェクト: zihammmm/pyre-check
def partial_application_with_tainted():
    x = __test_source()
    partial(a_flows_to_sink, x)
コード例 #4
0
ファイル: starred.py プロジェクト: zihammmm/pyre-check
def test():
    query = {"json": __test_source()}
    sink(query)
コード例 #5
0
ファイル: optionals.py プロジェクト: zihammmm/pyre-check
def test():
    client.get_instance().offer(__test_source())
コード例 #6
0
def source_via_format():
    taint = __test_source()
    return f"{taint} is bad"
コード例 #7
0
ファイル: select.py プロジェクト: moneytech/pyre-check
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
ファイル: features.py プロジェクト: zhuang-93/pyre-check
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
ファイル: properties.py プロジェクト: yuanchenhuan/pyre-check
 def writes_to_property(self):
     self.my_property = __test_source()
コード例 #16
0
def int_source() -> int:
    return __test_source()
コード例 #17
0
ファイル: properties.py プロジェクト: yuanchenhuan/pyre-check
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
ファイル: select.py プロジェクト: moneytech/pyre-check
def first_index():
    x = __test_source()
    return x["access_token"]
コード例 #20
0
def returns_tainted_object() -> object:
    return __test_source()
コード例 #21
0
ファイル: select.py プロジェクト: moneytech/pyre-check
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
ファイル: properties.py プロジェクト: yuanchenhuan/pyre-check
 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
ファイル: properties.py プロジェクト: yuanchenhuan/pyre-check
 def my_property(self) -> str:
     return __test_source()
コード例 #27
0
ファイル: decorator.py プロジェクト: rcramblit/pyre-check
def main() -> None:
    foo(__test_source())
    foo_with_sink(__test_source())
    await foo_async(__test_source())
コード例 #28
0
ファイル: properties.py プロジェクト: yuanchenhuan/pyre-check
 def uses_property_but_no_tito_taint(self):
     self.untainted = __test_source()
     return self.my_property
コード例 #29
0
ファイル: partial.py プロジェクト: zihammmm/pyre-check
def partial_application_with_named_b():
    x = __test_source()
    partial(a_flows_to_sink, b=x)
コード例 #30
0
ファイル: attributes.py プロジェクト: zihammmm/pyre-check
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"])