mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Python: TaintTracking: Move tests of py3 string methods
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
| test.py:28 | fail | binary_decode_encode | base64.a85encode(..) |
|
||||
| test.py:29 | fail | binary_decode_encode | base64.a85decode(..) |
|
||||
| test.py:32 | fail | binary_decode_encode | base64.b85encode(..) |
|
||||
| test.py:33 | fail | binary_decode_encode | base64.b85decode(..) |
|
||||
| test.py:36 | fail | binary_decode_encode | base64.encodebytes(..) |
|
||||
| test.py:37 | fail | binary_decode_encode | base64.decodebytes(..) |
|
||||
| test.py:45 | ok | f_strings | Fstring |
|
||||
| test.py:26 | ok | str_methods | ts.casefold() |
|
||||
| test.py:28 | ok | str_methods | ts.format_map(..) |
|
||||
| test.py:29 | fail | str_methods | "{unsafe}".format_map(..) |
|
||||
| test.py:40 | fail | binary_decode_encode | base64.a85encode(..) |
|
||||
| test.py:41 | fail | binary_decode_encode | base64.a85decode(..) |
|
||||
| test.py:44 | fail | binary_decode_encode | base64.b85encode(..) |
|
||||
| test.py:45 | fail | binary_decode_encode | base64.b85decode(..) |
|
||||
| test.py:48 | fail | binary_decode_encode | base64.encodebytes(..) |
|
||||
| test.py:49 | fail | binary_decode_encode | base64.decodebytes(..) |
|
||||
| test.py:57 | ok | f_strings | Fstring |
|
||||
|
||||
@@ -18,6 +18,18 @@ def ensure_not_tainted(*args):
|
||||
|
||||
# Actual tests
|
||||
|
||||
def str_methods():
|
||||
print("\n# str_methods")
|
||||
ts = TAINTED_STRING
|
||||
tb = TAINTED_BYTES
|
||||
ensure_tainted(
|
||||
ts.casefold(),
|
||||
|
||||
ts.format_map({}),
|
||||
"{unsafe}".format_map({"unsafe": ts}),
|
||||
)
|
||||
|
||||
|
||||
def binary_decode_encode():
|
||||
print("\n#percent_fmt")
|
||||
tb = TAINTED_BYTES
|
||||
@@ -47,5 +59,6 @@ def f_strings():
|
||||
|
||||
# Make tests runable
|
||||
|
||||
str_methods()
|
||||
binary_decode_encode()
|
||||
f_strings()
|
||||
|
||||
Reference in New Issue
Block a user