mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
python: handle guards compared to boolean literals
This commit is contained in:
@@ -22,4 +22,12 @@ isSanitizer
|
||||
| test_logical.py:176:24:176:24 | ControlFlowNode for s |
|
||||
| test_logical.py:185:24:185:24 | ControlFlowNode for s |
|
||||
| test_logical.py:193:24:193:24 | ControlFlowNode for s |
|
||||
| test_logical.py:199:28:199:28 | ControlFlowNode for s |
|
||||
| test_logical.py:206:28:206:28 | ControlFlowNode for s |
|
||||
| test_logical.py:211:28:211:28 | ControlFlowNode for s |
|
||||
| test_logical.py:214:28:214:28 | ControlFlowNode for s |
|
||||
| test_logical.py:219:28:219:28 | ControlFlowNode for s |
|
||||
| test_logical.py:226:28:226:28 | ControlFlowNode for s |
|
||||
| test_logical.py:231:28:231:28 | ControlFlowNode for s |
|
||||
| test_logical.py:234:28:234:28 | ControlFlowNode for s |
|
||||
| test_reference.py:31:28:31:28 | ControlFlowNode for s |
|
||||
|
||||
@@ -196,42 +196,42 @@ def test_comparison_with_bool():
|
||||
s = TAINTED_STRING
|
||||
|
||||
if is_safe(s) == True:
|
||||
ensure_not_tainted(s) # $ SPURIOUS: tainted
|
||||
ensure_not_tainted(s)
|
||||
else:
|
||||
ensure_tainted(s) # $ tainted
|
||||
|
||||
if is_safe(s) == False:
|
||||
ensure_tainted(s) # $ tainted
|
||||
else:
|
||||
ensure_not_tainted(s) # $ SPURIOUS: tainted
|
||||
ensure_not_tainted(s)
|
||||
|
||||
if is_safe(s) != True:
|
||||
ensure_tainted(s) # $ tainted
|
||||
else:
|
||||
ensure_not_tainted(s) # $ SPURIOUS: tainted
|
||||
ensure_not_tainted(s)
|
||||
|
||||
if is_safe(s) != False:
|
||||
ensure_not_tainted(s) # $ SPURIOUS: tainted
|
||||
ensure_not_tainted(s)
|
||||
else:
|
||||
ensure_tainted(s) # $ tainted
|
||||
|
||||
if is_safe(s) is True:
|
||||
ensure_not_tainted(s) # $ SPURIOUS: tainted
|
||||
ensure_not_tainted(s)
|
||||
else:
|
||||
ensure_tainted(s) # $ tainted
|
||||
|
||||
if is_safe(s) is False:
|
||||
ensure_tainted(s) # $ tainted
|
||||
else:
|
||||
ensure_not_tainted(s) # $ SPURIOUS: tainted
|
||||
ensure_not_tainted(s)
|
||||
|
||||
if is_safe(s) is not True:
|
||||
ensure_tainted(s) # $ tainted
|
||||
else:
|
||||
ensure_not_tainted(s) # $ SPURIOUS: tainted
|
||||
ensure_not_tainted(s)
|
||||
|
||||
if is_safe(s) is not False:
|
||||
ensure_not_tainted(s) # $ SPURIOUS: tainted
|
||||
ensure_not_tainted(s)
|
||||
else:
|
||||
ensure_tainted(s) # $ tainted
|
||||
|
||||
|
||||
Reference in New Issue
Block a user