Files
codeql/python/ql/src/Expressions/UseofApply.ql
Taus 5d5060b02b Python: Use API graphs instead of points-to for simple built-ins
Removes the use of points-to for accessing various built-ins from three
of the queries. In order for this to work I had to extend the lists of
known built-ins slightly.
2026-03-09 16:38:52 +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'."