mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Add tests cases with synthetic arguments
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
uniqueEnclosingCallable
|
||||
| test.py:239:27:239:27 | ControlFlowNode for p | Node should have one enclosing callable but has 0. |
|
||||
| test.py:245:5:245:22 | PosOverflowNode for overflowCallee() | Node should have one enclosing callable but has 0. |
|
||||
| test.py:248:5:248:26 | KwOverflowNode for overflowCallee() | Node should have one enclosing callable but has 0. |
|
||||
| test.py:251:5:251:33 | KwOverflowNode for overflowCallee() | Node should have one enclosing callable but has 0. |
|
||||
uniqueType
|
||||
uniqueNodeLocation
|
||||
missingLocation
|
||||
|
||||
@@ -235,3 +235,17 @@ def non_const_eq_preserves_taint(x):
|
||||
SINK(tainted) # unsafe
|
||||
if tainted == x:
|
||||
SINK(tainted) # unsafe
|
||||
|
||||
def overflowCallee(*args, p="", **kwargs):
|
||||
print("args", args)
|
||||
print("p", p)
|
||||
print("kwargs", kwargs)
|
||||
|
||||
def synth_arg_posOverflow():
|
||||
overflowCallee(42)
|
||||
|
||||
def synth_arg_kwOverflow():
|
||||
overflowCallee(foo=42)
|
||||
|
||||
def synth_arg_kwUnpacked():
|
||||
overflowCallee(**{"p": "42"})
|
||||
|
||||
Reference in New Issue
Block a user