mirror of
https://github.com/github/codeql.git
synced 2026-04-15 12:04:07 +02:00
24 lines
608 B
Plaintext
24 lines
608 B
Plaintext
/**
|
|
* @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."
|