We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
py/use-of-input
1 parent fe12e62 commit fad55b3Copy full SHA for fad55b3
python/ql/src/Expressions/UseofInput.ql
@@ -11,11 +11,11 @@
11
*/
12
13
import python
14
+import semmle.python.dataflow.new.DataFlow
15
+import semmle.python.ApiGraphs
16
-from CallNode call, Context context, ControlFlowNode func
17
+from DataFlow::CallCfgNode call
18
where
- context.getAVersion().includes(2, _) and
- call.getFunction() = func and
19
- func.pointsTo(context, Value::named("input"), _) and
20
- not func.pointsTo(context, Value::named("raw_input"), _)
+ call = API::builtin("input").getACall() and
+ call != API::builtin("raw_input").getACall()
21
select call, "The unsafe built-in function 'input' is used in Python 2."
0 commit comments