Files
codeql/python/ql/src/Statements/UseOfExit.ql
Taus Brock-Nannestad f07a7bf8cf Python: Autoformat everything using qlformat.
Will need subsequent PRs fixing up test failures (due to deprecated
methods moving around), but other than that everything should be
straight-forward.
2020-07-07 15:43:52 +02:00

19 lines
508 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 maintainability
* @problem.severity warning
* @sub-severity low
* @precision very-high
* @id py/use-of-exit-or-quit
*/
import python
from CallNode call, string name
where call.getFunction().pointsTo(Value::siteQuitter(name))
select call,
"The '" + name +
"' site.Quitter object may not exist if the 'site' module is not loaded or is modified."