Skip to content

Commit 0b31cb1

Browse files
committed
Python: Show that we have initial taint in urlsplit test
1 parent 400a8ff commit 0b31cb1

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

python/ql/test/library-tests/taint/namedtuple/TestTaint.expected

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
| test.py:13 | test_basic | c | externally controlled string |
44
| test.py:13 | test_basic | d | externally controlled string |
55
| test.py:13 | test_basic | urlsplit_res | [externally controlled string] |
6-
| test.py:20 | test_sanitizer | Attribute | NO TAINT |
7-
| test.py:23 | test_sanitizer | Subscript | NO TAINT |
8-
| test.py:26 | test_sanitizer | Attribute | NO TAINT |
9-
| test.py:29 | test_sanitizer | Attribute | NO TAINT |
10-
| test.py:32 | test_sanitizer | Attribute | externally controlled string |
11-
| test.py:42 | test_namedtuple | a | NO TAINT |
12-
| test.py:42 | test_namedtuple | b | NO TAINT |
13-
| test.py:42 | test_namedtuple | c | NO TAINT |
14-
| test.py:42 | test_namedtuple | d | NO TAINT |
6+
| test.py:19 | test_sanitizer | Attribute | externally controlled string |
7+
| test.py:22 | test_sanitizer | Attribute | NO TAINT |
8+
| test.py:25 | test_sanitizer | Subscript | NO TAINT |
9+
| test.py:28 | test_sanitizer | Attribute | NO TAINT |
10+
| test.py:31 | test_sanitizer | Attribute | NO TAINT |
11+
| test.py:34 | test_sanitizer | Attribute | externally controlled string |
12+
| test.py:44 | test_namedtuple | a | NO TAINT |
13+
| test.py:44 | test_namedtuple | b | NO TAINT |
14+
| test.py:44 | test_namedtuple | c | NO TAINT |
15+
| test.py:44 | test_namedtuple | d | NO TAINT |

python/ql/test/library-tests/taint/namedtuple/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def test_sanitizer():
1616
tainted_string = TAINTED_STRING
1717
urlsplit_res = urlsplit(tainted_string)
1818

19+
test(urlsplit_res.netloc) # should be tainted
20+
1921
if urlsplit_res.netloc == "OK":
2022
test(urlsplit_res.netloc)
2123

0 commit comments

Comments
 (0)