FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/ql/src/Statements/UseOfExit.ql at codeql-cli/v2.27.1 · github/codeql · GitHub
github
codeql
Repository navigation
Code
Issues
1k
(1k)
Pull requests
482
(482)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Statements
/
UseOfExit.ql
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (21 loc) · 608 Bytes
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Statements
/
UseOfExit.ql
Copy path
File metadata and controls
23 lines (21 loc) · 608 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* @name Use of exit() or quit()
* @description exit() or quit() may fail if the interpreter is run with the -S option.
* @kind problem
* @tags quality
* reliability
* correctness
* @problem.severity warning
* @sub-severity low
* @precision very-high
* @id py/use-of-exit-or-quit
*/
import
python
private
import
semmle.python.ApiGraphs
from
CallNode
call
,
string
name
where
name
=
[
"exit"
,
"quit"
]
and
call
=
API
::
builtin
(
name
)
.
getACall
(
)
.
asCfgNode
(
)
select
call
,
"The '"
+
name
+
"' site.Quitter object may not exist if the 'site' module is not loaded or is modified."
Back
|
FazBrowse Home
|
New Git URL