Skip to content

Commit 79cfe5a

Browse files
authored
Python: Limit py/use-of-input to Python 2
1 parent fad55b3 commit 79cfe5a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/ql/src/Expressions/UseofInput.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import semmle.python.ApiGraphs
1616

1717
from DataFlow::CallCfgNode call
1818
where
19+
major_version() = 2 and
1920
call = API::builtin("input").getACall() and
2021
call != API::builtin("raw_input").getACall()
2122
select call, "The unsafe built-in function 'input' is used in Python 2."

0 commit comments

Comments
 (0)