Python: Get rid of points-to from Definitions.qll

Turns out the `ImportTime` module (despite living in
`semmle.python.types` does not actually depend on points-to, so some of
the `LegacyPointsTo` imports could be replaced or removed.
This commit is contained in:
Taus
2025-10-31 14:56:13 +00:00
parent 7328f26311
commit e09840426c
8 changed files with 7 additions and 2 deletions

View File

@@ -32,7 +32,6 @@ import semmle.python.types.FunctionObject
import semmle.python.types.ModuleObject
import semmle.python.types.Exceptions
import semmle.python.types.Properties
import semmle.python.types.ImportTime
import semmle.python.types.Descriptors
import semmle.python.SelfAttribute

View File

@@ -4,6 +4,7 @@
import python
private import LegacyPointsTo
private import semmle.python.types.ImportTime
import IDEContextual
private newtype TDefinition =

View File

@@ -11,7 +11,7 @@ import python
* Escaping globals -- Global variables that have definitions and at least one of those definitions is in another scope.
*/
private import LegacyPointsTo
private import semmle.python.types.ImportTime
private import semmle.python.essa.SsaDefinitions
/** A source language variable, to be converted into a set of SSA variables. */

View File

@@ -1,5 +1,6 @@
import python
private import LegacyPointsTo
private import semmle.python.types.ImportTime
predicate is_import_time(Stmt s) { not s.getScope+() instanceof Function }

View File

@@ -14,6 +14,7 @@
import python
private import LegacyPointsTo
private import semmle.python.types.ImportTime
predicate import_star(ImportStar imp, ModuleValue exporter) {
exporter.importedAs(imp.getImportedModuleName())

View File

@@ -12,6 +12,7 @@
import python
private import LegacyPointsTo
private import semmle.python.types.ImportTime
import Variables.MonkeyPatched
import Loop

View File

@@ -14,6 +14,7 @@
import python
import Variables.MonkeyPatched
private import LegacyPointsTo
private import semmle.python.types.ImportTime
/* Local variable part */
predicate initialized_as_local(PlaceHolder use) {

View File

@@ -1,5 +1,6 @@
import python
private import LegacyPointsTo
private import semmle.python.types.ImportTime
import interesting
from int line, ControlFlowNodeWithPointsTo f, Object o, ImportTimeScope n