mirror of
https://github.com/github/codeql.git
synced 2026-08-04 17:33:18 +02:00
Flips the Python dataflow trunk from the legacy CFG (semmle/python/Flow.qll) and legacy ESSA SSA (semmle/python/essa/*) to the new shared CFG facade (semmle.python.controlflow.internal.Cfg) and the new SSA adapter (semmle.python.dataflow.new.internal.SsaImpl), both introduced additively in the preceding PRs in this stack. This is the trunk-flip equivalent of the original draft PR #21894 (kept around as documentation), rebased on top of the four preparatory PRs: P1: Remove AstNode.getAFlowNode() and rewrite callers (#21919). P2: Qualify Flow.qll's AST references with Py:: prefix (#21920). P3: Add new shared-CFG-backed control flow graph (#21921). P4: Add new shared-SSA-backed SSA adapter (#21923). The Python dataflow library (semmle/python/dataflow/new/) now imports the new CFG facade and SSA adapter. All CFG-typed predicates (ControlFlowNode, CallNode, BasicBlock, NameNode, AttrNode, ...) are qualified with the Cfg:: prefix; SSA references switch from EssaVariable/EssaDefinition to SsaImpl::Definition/SourceVariable. GuardNode is redesigned to use the new CFG's outcome-node model (isAfterTrue / isAfterFalse) instead of the legacy ConditionBlock + flipped indirection. Only BarrierGuard<...> is preserved as public API. Framework files (Bottle, FastApi, Django, Tornado, Pyramid, Stdlib, ...) are updated to take CFG nodes from the new facade. A handful of dataflow consistency tweaks for the new CFG: - Augmented-assignment targets are treated as both load and store. - 'from X import *' produces uncertain SSA writes for unknown names. - CFG nodes are canonicalised so dataflow does not see equivalent pre/post-order pairs as distinct nodes. Two AST tweaks for the new CFG: - AstNodeImpl: omit PEP 695 type-parameter names from FunctionDefExpr / ClassDefExpr children. - ImportResolution: drop the legacy essa import. Test churn (~175 files): reblessed library- and query-test .expected files reflect slightly different CFG granularity, different toString output, and a handful of true alert deltas in security queries. Verification: all 367 lib + src + consistency-queries compile clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
121 lines
11 KiB
Plaintext
121 lines
11 KiB
Plaintext
edges
|
|
| xslt.py:3:26:3:32 | After ImportMember | xslt.py:3:26:3:32 | request | provenance | |
|
|
| xslt.py:3:26:3:32 | request | xslt.py:10:17:10:23 | request | provenance | |
|
|
| xslt.py:10:5:10:13 | xsltQuery | xslt.py:11:27:11:35 | xsltQuery | provenance | |
|
|
| xslt.py:10:17:10:23 | request | xslt.py:10:17:10:28 | After Attribute | provenance | AdditionalTaintStep |
|
|
| xslt.py:10:17:10:28 | After Attribute | xslt.py:10:17:10:43 | After Attribute() | provenance | dict.get |
|
|
| xslt.py:10:17:10:43 | After Attribute() | xslt.py:10:5:10:13 | xsltQuery | provenance | |
|
|
| xslt.py:11:5:11:13 | xslt_root | xslt.py:14:29:14:37 | xslt_root | provenance | |
|
|
| xslt.py:11:17:11:36 | After Attribute() | xslt.py:11:5:11:13 | xslt_root | provenance | |
|
|
| xslt.py:11:27:11:35 | xsltQuery | xslt.py:11:17:11:36 | After Attribute() | provenance | Config |
|
|
| xslt.py:11:27:11:35 | xsltQuery | xslt.py:11:17:11:36 | After Attribute() | provenance | Decoding-XML |
|
|
| xsltInjection.py:3:26:3:32 | After ImportMember | xsltInjection.py:3:26:3:32 | request | provenance | |
|
|
| xsltInjection.py:3:26:3:32 | request | xsltInjection.py:10:17:10:23 | request | provenance | |
|
|
| xsltInjection.py:3:26:3:32 | request | xsltInjection.py:17:17:17:23 | request | provenance | |
|
|
| xsltInjection.py:3:26:3:32 | request | xsltInjection.py:26:17:26:23 | request | provenance | |
|
|
| xsltInjection.py:3:26:3:32 | request | xsltInjection.py:35:17:35:23 | request | provenance | |
|
|
| xsltInjection.py:3:26:3:32 | request | xsltInjection.py:44:17:44:23 | request | provenance | |
|
|
| xsltInjection.py:10:5:10:13 | xsltQuery | xsltInjection.py:11:27:11:35 | xsltQuery | provenance | |
|
|
| xsltInjection.py:10:17:10:23 | request | xsltInjection.py:10:17:10:28 | After Attribute | provenance | AdditionalTaintStep |
|
|
| xsltInjection.py:10:17:10:28 | After Attribute | xsltInjection.py:10:17:10:43 | After Attribute() | provenance | dict.get |
|
|
| xsltInjection.py:10:17:10:43 | After Attribute() | xsltInjection.py:10:5:10:13 | xsltQuery | provenance | |
|
|
| xsltInjection.py:11:5:11:13 | xslt_root | xsltInjection.py:12:28:12:36 | xslt_root | provenance | |
|
|
| xsltInjection.py:11:17:11:36 | After Attribute() | xsltInjection.py:11:5:11:13 | xslt_root | provenance | |
|
|
| xsltInjection.py:11:27:11:35 | xsltQuery | xsltInjection.py:11:17:11:36 | After Attribute() | provenance | Config |
|
|
| xsltInjection.py:11:27:11:35 | xsltQuery | xsltInjection.py:11:17:11:36 | After Attribute() | provenance | Decoding-XML |
|
|
| xsltInjection.py:17:5:17:13 | xsltQuery | xsltInjection.py:18:27:18:35 | xsltQuery | provenance | |
|
|
| xsltInjection.py:17:17:17:23 | request | xsltInjection.py:17:17:17:28 | After Attribute | provenance | AdditionalTaintStep |
|
|
| xsltInjection.py:17:17:17:28 | After Attribute | xsltInjection.py:17:17:17:43 | After Attribute() | provenance | dict.get |
|
|
| xsltInjection.py:17:17:17:43 | After Attribute() | xsltInjection.py:17:5:17:13 | xsltQuery | provenance | |
|
|
| xsltInjection.py:18:5:18:13 | xslt_root | xsltInjection.py:21:29:21:37 | xslt_root | provenance | |
|
|
| xsltInjection.py:18:17:18:36 | After Attribute() | xsltInjection.py:18:5:18:13 | xslt_root | provenance | |
|
|
| xsltInjection.py:18:27:18:35 | xsltQuery | xsltInjection.py:18:17:18:36 | After Attribute() | provenance | Config |
|
|
| xsltInjection.py:18:27:18:35 | xsltQuery | xsltInjection.py:18:17:18:36 | After Attribute() | provenance | Decoding-XML |
|
|
| xsltInjection.py:26:5:26:13 | xsltQuery | xsltInjection.py:27:27:27:35 | xsltQuery | provenance | |
|
|
| xsltInjection.py:26:17:26:23 | request | xsltInjection.py:26:17:26:28 | After Attribute | provenance | AdditionalTaintStep |
|
|
| xsltInjection.py:26:17:26:28 | After Attribute | xsltInjection.py:26:17:26:43 | After Attribute() | provenance | dict.get |
|
|
| xsltInjection.py:26:17:26:43 | After Attribute() | xsltInjection.py:26:5:26:13 | xsltQuery | provenance | |
|
|
| xsltInjection.py:27:5:27:13 | xslt_root | xsltInjection.py:31:24:31:32 | xslt_root | provenance | |
|
|
| xsltInjection.py:27:17:27:36 | After Attribute() | xsltInjection.py:27:5:27:13 | xslt_root | provenance | |
|
|
| xsltInjection.py:27:27:27:35 | xsltQuery | xsltInjection.py:27:17:27:36 | After Attribute() | provenance | Config |
|
|
| xsltInjection.py:27:27:27:35 | xsltQuery | xsltInjection.py:27:17:27:36 | After Attribute() | provenance | Decoding-XML |
|
|
| xsltInjection.py:35:5:35:13 | xsltQuery | xsltInjection.py:36:34:36:42 | xsltQuery | provenance | |
|
|
| xsltInjection.py:35:17:35:23 | request | xsltInjection.py:35:17:35:28 | After Attribute | provenance | AdditionalTaintStep |
|
|
| xsltInjection.py:35:17:35:28 | After Attribute | xsltInjection.py:35:17:35:43 | After Attribute() | provenance | dict.get |
|
|
| xsltInjection.py:35:17:35:43 | After Attribute() | xsltInjection.py:35:5:35:13 | xsltQuery | provenance | |
|
|
| xsltInjection.py:36:5:36:13 | xslt_root | xsltInjection.py:40:24:40:32 | xslt_root | provenance | |
|
|
| xsltInjection.py:36:17:36:43 | After Attribute() | xsltInjection.py:36:5:36:13 | xslt_root | provenance | |
|
|
| xsltInjection.py:36:34:36:42 | xsltQuery | xsltInjection.py:36:17:36:43 | After Attribute() | provenance | Config |
|
|
| xsltInjection.py:36:34:36:42 | xsltQuery | xsltInjection.py:36:17:36:43 | After Attribute() | provenance | Decoding-XML |
|
|
| xsltInjection.py:44:5:44:13 | xsltQuery | xsltInjection.py:45:5:45:15 | xsltStrings | provenance | |
|
|
| xsltInjection.py:44:17:44:23 | request | xsltInjection.py:44:17:44:28 | After Attribute | provenance | AdditionalTaintStep |
|
|
| xsltInjection.py:44:17:44:28 | After Attribute | xsltInjection.py:44:17:44:43 | After Attribute() | provenance | dict.get |
|
|
| xsltInjection.py:44:17:44:43 | After Attribute() | xsltInjection.py:44:5:44:13 | xsltQuery | provenance | |
|
|
| xsltInjection.py:45:5:45:15 | xsltStrings | xsltInjection.py:46:38:46:48 | xsltStrings | provenance | |
|
|
| xsltInjection.py:46:5:46:13 | xslt_root | xsltInjection.py:50:24:50:32 | xslt_root | provenance | |
|
|
| xsltInjection.py:46:17:46:49 | After Attribute() | xsltInjection.py:46:5:46:13 | xslt_root | provenance | |
|
|
| xsltInjection.py:46:38:46:48 | xsltStrings | xsltInjection.py:46:17:46:49 | After Attribute() | provenance | Config |
|
|
| xsltInjection.py:46:38:46:48 | xsltStrings | xsltInjection.py:46:17:46:49 | After Attribute() | provenance | Decoding-XML |
|
|
nodes
|
|
| xslt.py:3:26:3:32 | After ImportMember | semmle.label | After ImportMember |
|
|
| xslt.py:3:26:3:32 | request | semmle.label | request |
|
|
| xslt.py:10:5:10:13 | xsltQuery | semmle.label | xsltQuery |
|
|
| xslt.py:10:17:10:23 | request | semmle.label | request |
|
|
| xslt.py:10:17:10:28 | After Attribute | semmle.label | After Attribute |
|
|
| xslt.py:10:17:10:43 | After Attribute() | semmle.label | After Attribute() |
|
|
| xslt.py:11:5:11:13 | xslt_root | semmle.label | xslt_root |
|
|
| xslt.py:11:17:11:36 | After Attribute() | semmle.label | After Attribute() |
|
|
| xslt.py:11:27:11:35 | xsltQuery | semmle.label | xsltQuery |
|
|
| xslt.py:14:29:14:37 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:3:26:3:32 | After ImportMember | semmle.label | After ImportMember |
|
|
| xsltInjection.py:3:26:3:32 | request | semmle.label | request |
|
|
| xsltInjection.py:10:5:10:13 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:10:17:10:23 | request | semmle.label | request |
|
|
| xsltInjection.py:10:17:10:28 | After Attribute | semmle.label | After Attribute |
|
|
| xsltInjection.py:10:17:10:43 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:11:5:11:13 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:11:17:11:36 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:11:27:11:35 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:12:28:12:36 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:17:5:17:13 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:17:17:17:23 | request | semmle.label | request |
|
|
| xsltInjection.py:17:17:17:28 | After Attribute | semmle.label | After Attribute |
|
|
| xsltInjection.py:17:17:17:43 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:18:5:18:13 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:18:17:18:36 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:18:27:18:35 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:21:29:21:37 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:26:5:26:13 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:26:17:26:23 | request | semmle.label | request |
|
|
| xsltInjection.py:26:17:26:28 | After Attribute | semmle.label | After Attribute |
|
|
| xsltInjection.py:26:17:26:43 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:27:5:27:13 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:27:17:27:36 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:27:27:27:35 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:31:24:31:32 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:35:5:35:13 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:35:17:35:23 | request | semmle.label | request |
|
|
| xsltInjection.py:35:17:35:28 | After Attribute | semmle.label | After Attribute |
|
|
| xsltInjection.py:35:17:35:43 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:36:5:36:13 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:36:17:36:43 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:36:34:36:42 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:40:24:40:32 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:44:5:44:13 | xsltQuery | semmle.label | xsltQuery |
|
|
| xsltInjection.py:44:17:44:23 | request | semmle.label | request |
|
|
| xsltInjection.py:44:17:44:28 | After Attribute | semmle.label | After Attribute |
|
|
| xsltInjection.py:44:17:44:43 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:45:5:45:15 | xsltStrings | semmle.label | xsltStrings |
|
|
| xsltInjection.py:46:5:46:13 | xslt_root | semmle.label | xslt_root |
|
|
| xsltInjection.py:46:17:46:49 | After Attribute() | semmle.label | After Attribute() |
|
|
| xsltInjection.py:46:38:46:48 | xsltStrings | semmle.label | xsltStrings |
|
|
| xsltInjection.py:50:24:50:32 | xslt_root | semmle.label | xslt_root |
|
|
subpaths
|
|
#select
|
|
| xslt.py:14:29:14:37 | xslt_root | xslt.py:3:26:3:32 | After ImportMember | xslt.py:14:29:14:37 | xslt_root | This XSLT query depends on $@. | xslt.py:3:26:3:32 | After ImportMember | user-provided value |
|
|
| xsltInjection.py:12:28:12:36 | xslt_root | xsltInjection.py:3:26:3:32 | After ImportMember | xsltInjection.py:12:28:12:36 | xslt_root | This XSLT query depends on $@. | xsltInjection.py:3:26:3:32 | After ImportMember | user-provided value |
|
|
| xsltInjection.py:21:29:21:37 | xslt_root | xsltInjection.py:3:26:3:32 | After ImportMember | xsltInjection.py:21:29:21:37 | xslt_root | This XSLT query depends on $@. | xsltInjection.py:3:26:3:32 | After ImportMember | user-provided value |
|
|
| xsltInjection.py:31:24:31:32 | xslt_root | xsltInjection.py:3:26:3:32 | After ImportMember | xsltInjection.py:31:24:31:32 | xslt_root | This XSLT query depends on $@. | xsltInjection.py:3:26:3:32 | After ImportMember | user-provided value |
|
|
| xsltInjection.py:40:24:40:32 | xslt_root | xsltInjection.py:3:26:3:32 | After ImportMember | xsltInjection.py:40:24:40:32 | xslt_root | This XSLT query depends on $@. | xsltInjection.py:3:26:3:32 | After ImportMember | user-provided value |
|
|
| xsltInjection.py:50:24:50:32 | xslt_root | xsltInjection.py:3:26:3:32 | After ImportMember | xsltInjection.py:50:24:50:32 | xslt_root | This XSLT query depends on $@. | xsltInjection.py:3:26:3:32 | After ImportMember | user-provided value |
|