mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
Merge pull request #2419 from tausbn/python-fix-use-of-input-fp
Python: Fix false positive for `py/use-of-input`.
This commit is contained in:
@@ -14,5 +14,8 @@ import python
|
||||
|
||||
from CallNode call, Context context, ControlFlowNode func
|
||||
where
|
||||
context.getAVersion().includes(2, _) and call.getFunction() = func and func.refersTo(context, Object::builtin("input"), _, _)
|
||||
context.getAVersion().includes(2, _) and
|
||||
call.getFunction() = func and
|
||||
func.pointsTo(context, Value::named("input"), _) and
|
||||
not func.pointsTo(context, Value::named("raw_input"), _)
|
||||
select call, "The unsafe built-in function 'input' is used."
|
||||
|
||||
Reference in New Issue
Block a user