mirror of
https://github.com/github/codeql.git
synced 2026-04-04 22:58:16 +02:00
Moves the existing points-to predicates to the newly added class `ControlFlowNodeWithPointsTo` which resides in the `LegacyPointsTo` module. (Existing code that uses these predicates should import this module, and references to `ControlFlowNode` should be changed to `ControlFlowNodeWithPointsTo`.) Also updates all existing points-to based code to do just this.
19 lines
562 B
Plaintext
19 lines
562 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 LegacyPointsTo
|
|
private import semmle.python.types.Builtins
|
|
|
|
from CallNode call, ControlFlowNodeWithPointsTo func
|
|
where major_version() = 2 and call.getFunction() = func and func.pointsTo(Value::named("apply"))
|
|
select call, "Call to the obsolete builtin function 'apply'."
|