Files
codeql/python/ql/src/Expressions/UseofApply.ql
Taus f4841e1f39 Python: Use API graphs instead of points-to for simple built-ins
Also extends the list of known built-ins slightly, to add some that were
missing.
2026-03-20 13:28:44 +00:00

20 lines
482 B
Plaintext

/**
* @name 'apply' function used
* @description The builtin function 'apply' is obsolete and should not be used.
* @kind problem
* @tags maintainability
* @problem.severity warning
* @sub-severity high
* @precision very-high
* @id py/use-of-apply
*/
import python
private import semmle.python.ApiGraphs
from CallNode call
where
major_version() = 2 and
call = API::builtin("apply").getACall().asCfgNode()
select call, "Call to the obsolete builtin function 'apply'."