mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Python: Add BarrierGuard test with return inside unsafe branch
This commit is contained in:
@@ -32,6 +32,7 @@ test_taint
|
||||
| test_logical.py:123 | ok | test_nesting_not_with_and_true | s |
|
||||
| test_logical.py:126 | ok | test_nesting_not_with_and_true | s |
|
||||
| test_logical.py:128 | ok | test_nesting_not_with_and_true | s |
|
||||
| test_logical.py:137 | fail | test_with_return | s |
|
||||
isSanitizer
|
||||
| TestTaintTrackingConfiguration | test.py:21:39:21:39 | ControlFlowNode for s |
|
||||
| TestTaintTrackingConfiguration | test.py:50:10:50:29 | ControlFlowNode for emulated_escaping() |
|
||||
|
||||
@@ -128,6 +128,15 @@ def test_nesting_not_with_and_true():
|
||||
ensure_not_tainted(s)
|
||||
|
||||
|
||||
def test_with_return():
|
||||
s = TAINTED_STRING
|
||||
|
||||
if not is_safe(s):
|
||||
return
|
||||
|
||||
ensure_not_tainted(s)
|
||||
|
||||
|
||||
# Make tests runable
|
||||
|
||||
test_basic()
|
||||
@@ -136,3 +145,4 @@ test_and()
|
||||
test_tricky()
|
||||
test_nesting_not()
|
||||
test_nesting_not_with_and_true()
|
||||
test_with_return()
|
||||
|
||||
Reference in New Issue
Block a user