Python: Show that list(tainted_string) works

This commit is contained in:
Rasmus Wriedt Larsen
2020-01-20 11:59:56 +01:00
parent 0da78f216a
commit df8be438bb
4 changed files with 56 additions and 41 deletions

View File

@@ -1,16 +1,16 @@
| Taint exception.info | test.py:60 | test.py:60:22:60:26 | taint | p1 = exception.info |
| Taint exception.info | test.py:61 | test.py:61:12:61:22 | func() | p1 = exception.info |
| Taint exception.info | test.py:61 | test.py:61:17:61:21 | taint | p1 = exception.info |
| Taint exception.info | test.py:64 | test.py:64:12:64:33 | TAINTED_EXCEPTION_INFO | |
| Taint exception.info | test.py:65 | test.py:65:11:65:41 | cross_over() | |
| Taint exception.info | test.py:65 | test.py:65:37:65:40 | info | |
| Taint exception.info | test.py:67 | test.py:67:19:67:21 | arg | p0 = exception.info |
| Taint exception.info | test.py:68 | test.py:68:12:68:14 | arg | p0 = exception.info |
| Taint externally controlled string | test.py:60 | test.py:60:22:60:26 | taint | p1 = externally controlled string |
| Taint externally controlled string | test.py:61 | test.py:61:12:61:22 | func() | p1 = externally controlled string |
| Taint externally controlled string | test.py:61 | test.py:61:17:61:21 | taint | p1 = externally controlled string |
| Taint externally controlled string | test.py:67 | test.py:67:19:67:21 | arg | p0 = externally controlled string |
| Taint externally controlled string | test.py:68 | test.py:68:12:68:14 | arg | p0 = externally controlled string |
| Taint externally controlled string | test.py:71 | test.py:71:11:71:33 | TAINTED_EXTERNAL_STRING | |
| Taint externally controlled string | test.py:72 | test.py:72:11:72:41 | cross_over() | |
| Taint externally controlled string | test.py:72 | test.py:72:38:72:40 | ext | |
| Taint exception.info | test.py:63 | test.py:63:22:63:26 | taint | p1 = exception.info |
| Taint exception.info | test.py:64 | test.py:64:12:64:22 | func() | p1 = exception.info |
| Taint exception.info | test.py:64 | test.py:64:17:64:21 | taint | p1 = exception.info |
| Taint exception.info | test.py:67 | test.py:67:12:67:33 | TAINTED_EXCEPTION_INFO | |
| Taint exception.info | test.py:68 | test.py:68:11:68:41 | cross_over() | |
| Taint exception.info | test.py:68 | test.py:68:37:68:40 | info | |
| Taint exception.info | test.py:70 | test.py:70:19:70:21 | arg | p0 = exception.info |
| Taint exception.info | test.py:71 | test.py:71:12:71:14 | arg | p0 = exception.info |
| Taint externally controlled string | test.py:63 | test.py:63:22:63:26 | taint | p1 = externally controlled string |
| Taint externally controlled string | test.py:64 | test.py:64:12:64:22 | func() | p1 = externally controlled string |
| Taint externally controlled string | test.py:64 | test.py:64:17:64:21 | taint | p1 = externally controlled string |
| Taint externally controlled string | test.py:70 | test.py:70:19:70:21 | arg | p0 = externally controlled string |
| Taint externally controlled string | test.py:71 | test.py:71:12:71:14 | arg | p0 = externally controlled string |
| Taint externally controlled string | test.py:74 | test.py:74:11:74:33 | TAINTED_EXTERNAL_STRING | |
| Taint externally controlled string | test.py:75 | test.py:75:11:75:41 | cross_over() | |
| Taint externally controlled string | test.py:75 | test.py:75:38:75:40 | ext | |

View File

@@ -7,6 +7,8 @@
| Taint [externally controlled string] | test.py:16 | test.py:16:9:16:27 | Attribute() | |
| Taint [externally controlled string] | test.py:17 | test.py:17:15:17:26 | tainted_list | |
| Taint [externally controlled string] | test.py:24 | test.py:24:14:24:34 | Attribute() | |
| Taint [externally controlled string] | test.py:39 | test.py:39:20:39:35 | List | |
| Taint [externally controlled string] | test.py:40 | test.py:40:22:40:36 | Tuple | |
| Taint externally controlled string | test.py:5 | test.py:5:22:5:28 | TAINTED | |
| Taint externally controlled string | test.py:6 | test.py:6:31:6:44 | tainted_string | |
| Taint externally controlled string | test.py:7 | test.py:7:9:7:25 | Subscript | |
@@ -35,20 +37,23 @@
| Taint externally controlled string | test.py:37 | test.py:37:14:37:27 | tainted_string | |
| Taint externally controlled string | test.py:38 | test.py:38:9:38:22 | tainted_string | |
| Taint externally controlled string | test.py:38 | test.py:38:9:38:30 | Attribute() | |
| Taint externally controlled string | test.py:41 | test.py:41:22:41:28 | TAINTED | |
| Taint externally controlled string | test.py:42 | test.py:42:8:42:21 | tainted_string | |
| Taint externally controlled string | test.py:45 | test.py:45:23:45:36 | tainted_string | |
| Taint externally controlled string | test.py:48 | test.py:48:22:48:28 | TAINTED | |
| Taint externally controlled string | test.py:49 | test.py:49:8:49:21 | tainted_string | |
| Taint externally controlled string | test.py:49 | test.py:49:34:49:47 | tainted_string | |
| Taint externally controlled string | test.py:52 | test.py:52:23:52:36 | tainted_string | |
| Taint externally controlled string | test.py:55 | test.py:55:22:55:28 | TAINTED | |
| Taint externally controlled string | test.py:56 | test.py:56:9:56:27 | str() | |
| Taint externally controlled string | test.py:56 | test.py:56:13:56:26 | tainted_string | |
| Taint externally controlled string | test.py:57 | test.py:57:9:57:29 | bytes() | |
| Taint externally controlled string | test.py:57 | test.py:57:15:57:28 | tainted_string | |
| Taint externally controlled string | test.py:58 | test.py:58:9:58:46 | bytes() | |
| Taint externally controlled string | test.py:58 | test.py:58:15:58:28 | tainted_string | |
| Taint externally controlled string | test.py:39 | test.py:39:21:39:34 | tainted_string | |
| Taint externally controlled string | test.py:40 | test.py:40:22:40:35 | tainted_string | |
| Taint externally controlled string | test.py:41 | test.py:41:28:41:41 | tainted_string | |
| Taint externally controlled string | test.py:44 | test.py:44:22:44:28 | TAINTED | |
| Taint externally controlled string | test.py:45 | test.py:45:8:45:21 | tainted_string | |
| Taint externally controlled string | test.py:48 | test.py:48:23:48:36 | tainted_string | |
| Taint externally controlled string | test.py:51 | test.py:51:22:51:28 | TAINTED | |
| Taint externally controlled string | test.py:52 | test.py:52:8:52:21 | tainted_string | |
| Taint externally controlled string | test.py:52 | test.py:52:34:52:47 | tainted_string | |
| Taint externally controlled string | test.py:55 | test.py:55:23:55:36 | tainted_string | |
| Taint externally controlled string | test.py:58 | test.py:58:22:58:28 | TAINTED | |
| Taint externally controlled string | test.py:59 | test.py:59:9:59:27 | str() | |
| Taint externally controlled string | test.py:59 | test.py:59:13:59:26 | tainted_string | |
| Taint externally controlled string | test.py:60 | test.py:60:9:60:29 | bytes() | |
| Taint externally controlled string | test.py:60 | test.py:60:15:60:28 | tainted_string | |
| Taint externally controlled string | test.py:61 | test.py:61:9:61:46 | bytes() | |
| Taint externally controlled string | test.py:61 | test.py:61:15:61:28 | tainted_string | |
| Taint json[externally controlled string] | test.py:6 | test.py:6:20:6:45 | Attribute() | |
| Taint json[externally controlled string] | test.py:7 | test.py:7:9:7:20 | tainted_json | |
| Taint json[externally controlled string] | test.py:7 | test.py:7:9:7:25 | Subscript | |
@@ -63,3 +68,4 @@
| Taint {externally controlled string} | test.py:23 | test.py:23:9:23:27 | Attribute() | |
| Taint {externally controlled string} | test.py:24 | test.py:24:14:24:25 | tainted_dict | |
| Taint {externally controlled string} | test.py:27 | test.py:27:17:27:28 | tainted_dict | |
| Taint {externally controlled string} | test.py:41 | test.py:41:20:41:42 | Dict | |

View File

@@ -20,6 +20,9 @@
| Taint externally controlled string | test.py:31 | test.py:31:22:31:28 | TAINTED | | --> | Taint externally controlled string | test.py:36 | test.py:36:18:36:31 | tainted_string | |
| Taint externally controlled string | test.py:31 | test.py:31:22:31:28 | TAINTED | | --> | Taint externally controlled string | test.py:37 | test.py:37:14:37:27 | tainted_string | |
| Taint externally controlled string | test.py:31 | test.py:31:22:31:28 | TAINTED | | --> | Taint externally controlled string | test.py:38 | test.py:38:9:38:22 | tainted_string | |
| Taint externally controlled string | test.py:31 | test.py:31:22:31:28 | TAINTED | | --> | Taint externally controlled string | test.py:39 | test.py:39:21:39:34 | tainted_string | |
| Taint externally controlled string | test.py:31 | test.py:31:22:31:28 | TAINTED | | --> | Taint externally controlled string | test.py:40 | test.py:40:22:40:35 | tainted_string | |
| Taint externally controlled string | test.py:31 | test.py:31:22:31:28 | TAINTED | | --> | Taint externally controlled string | test.py:41 | test.py:41:28:41:41 | tainted_string | |
| Taint externally controlled string | test.py:32 | test.py:32:9:32:22 | tainted_string | | --> | Taint externally controlled string | test.py:32 | test.py:32:9:32:31 | Attribute() | |
| Taint externally controlled string | test.py:33 | test.py:33:9:33:22 | tainted_string | | --> | Taint externally controlled string | test.py:33 | test.py:33:9:33:29 | Attribute() | |
| Taint externally controlled string | test.py:34 | test.py:34:9:34:22 | tainted_string | | --> | Taint externally controlled string | test.py:34 | test.py:34:9:34:25 | Subscript | |
@@ -27,17 +30,20 @@
| Taint externally controlled string | test.py:36 | test.py:36:18:36:31 | tainted_string | | --> | Taint externally controlled string | test.py:36 | test.py:36:9:36:32 | reversed() | |
| Taint externally controlled string | test.py:37 | test.py:37:14:37:27 | tainted_string | | --> | Taint externally controlled string | test.py:37 | test.py:37:9:37:28 | copy() | |
| Taint externally controlled string | test.py:38 | test.py:38:9:38:22 | tainted_string | | --> | Taint externally controlled string | test.py:38 | test.py:38:9:38:30 | Attribute() | |
| Taint externally controlled string | test.py:41 | test.py:41:22:41:28 | TAINTED | | --> | Taint externally controlled string | test.py:42 | test.py:42:8:42:21 | tainted_string | |
| Taint externally controlled string | test.py:41 | test.py:41:22:41:28 | TAINTED | | --> | Taint externally controlled string | test.py:45 | test.py:45:23:45:36 | tainted_string | |
| Taint externally controlled string | test.py:48 | test.py:48:22:48:28 | TAINTED | | --> | Taint externally controlled string | test.py:49 | test.py:49:8:49:21 | tainted_string | |
| Taint externally controlled string | test.py:48 | test.py:48:22:48:28 | TAINTED | | --> | Taint externally controlled string | test.py:49 | test.py:49:34:49:47 | tainted_string | |
| Taint externally controlled string | test.py:48 | test.py:48:22:48:28 | TAINTED | | --> | Taint externally controlled string | test.py:52 | test.py:52:23:52:36 | tainted_string | |
| Taint externally controlled string | test.py:55 | test.py:55:22:55:28 | TAINTED | | --> | Taint externally controlled string | test.py:56 | test.py:56:13:56:26 | tainted_string | |
| Taint externally controlled string | test.py:55 | test.py:55:22:55:28 | TAINTED | | --> | Taint externally controlled string | test.py:57 | test.py:57:15:57:28 | tainted_string | |
| Taint externally controlled string | test.py:55 | test.py:55:22:55:28 | TAINTED | | --> | Taint externally controlled string | test.py:58 | test.py:58:15:58:28 | tainted_string | |
| Taint externally controlled string | test.py:56 | test.py:56:13:56:26 | tainted_string | | --> | Taint externally controlled string | test.py:56 | test.py:56:9:56:27 | str() | |
| Taint externally controlled string | test.py:57 | test.py:57:15:57:28 | tainted_string | | --> | Taint externally controlled string | test.py:57 | test.py:57:9:57:29 | bytes() | |
| Taint externally controlled string | test.py:58 | test.py:58:15:58:28 | tainted_string | | --> | Taint externally controlled string | test.py:58 | test.py:58:9:58:46 | bytes() | |
| Taint externally controlled string | test.py:39 | test.py:39:21:39:34 | tainted_string | | --> | Taint [externally controlled string] | test.py:39 | test.py:39:20:39:35 | List | |
| Taint externally controlled string | test.py:40 | test.py:40:22:40:35 | tainted_string | | --> | Taint [externally controlled string] | test.py:40 | test.py:40:22:40:36 | Tuple | |
| Taint externally controlled string | test.py:41 | test.py:41:28:41:41 | tainted_string | | --> | Taint {externally controlled string} | test.py:41 | test.py:41:20:41:42 | Dict | |
| Taint externally controlled string | test.py:44 | test.py:44:22:44:28 | TAINTED | | --> | Taint externally controlled string | test.py:45 | test.py:45:8:45:21 | tainted_string | |
| Taint externally controlled string | test.py:44 | test.py:44:22:44:28 | TAINTED | | --> | Taint externally controlled string | test.py:48 | test.py:48:23:48:36 | tainted_string | |
| Taint externally controlled string | test.py:51 | test.py:51:22:51:28 | TAINTED | | --> | Taint externally controlled string | test.py:52 | test.py:52:8:52:21 | tainted_string | |
| Taint externally controlled string | test.py:51 | test.py:51:22:51:28 | TAINTED | | --> | Taint externally controlled string | test.py:52 | test.py:52:34:52:47 | tainted_string | |
| Taint externally controlled string | test.py:51 | test.py:51:22:51:28 | TAINTED | | --> | Taint externally controlled string | test.py:55 | test.py:55:23:55:36 | tainted_string | |
| Taint externally controlled string | test.py:58 | test.py:58:22:58:28 | TAINTED | | --> | Taint externally controlled string | test.py:59 | test.py:59:13:59:26 | tainted_string | |
| Taint externally controlled string | test.py:58 | test.py:58:22:58:28 | TAINTED | | --> | Taint externally controlled string | test.py:60 | test.py:60:15:60:28 | tainted_string | |
| Taint externally controlled string | test.py:58 | test.py:58:22:58:28 | TAINTED | | --> | Taint externally controlled string | test.py:61 | test.py:61:15:61:28 | tainted_string | |
| Taint externally controlled string | test.py:59 | test.py:59:13:59:26 | tainted_string | | --> | Taint externally controlled string | test.py:59 | test.py:59:9:59:27 | str() | |
| Taint externally controlled string | test.py:60 | test.py:60:15:60:28 | tainted_string | | --> | Taint externally controlled string | test.py:60 | test.py:60:9:60:29 | bytes() | |
| Taint externally controlled string | test.py:61 | test.py:61:15:61:28 | tainted_string | | --> | Taint externally controlled string | test.py:61 | test.py:61:9:61:46 | bytes() | |
| Taint json[externally controlled string] | test.py:6 | test.py:6:20:6:45 | Attribute() | | --> | Taint json[externally controlled string] | test.py:7 | test.py:7:9:7:20 | tainted_json | |
| Taint json[externally controlled string] | test.py:7 | test.py:7:9:7:20 | tainted_json | | --> | Taint externally controlled string | test.py:7 | test.py:7:9:7:25 | Subscript | |
| Taint json[externally controlled string] | test.py:7 | test.py:7:9:7:20 | tainted_json | | --> | Taint json[externally controlled string] | test.py:7 | test.py:7:9:7:25 | Subscript | |

View File

@@ -36,6 +36,9 @@ def test_str():
e = reversed(tainted_string)
f = copy(tainted_string)
h = tainted_string.strip()
tainted_list = [tainted_string]
tainted_tuple = (tainted_string,)
tainted_dict = {'key': tainted_string}
def test_const_sanitizer1():
tainted_string = TAINTED