Files
codeql/python/ql/test/experimental/query-tests/Security/CWE-327-UnsafeUsageOfClientSideEncryptionVersion/UnsafeUsageOfClientSideEncryptionVersion.expected
Copilot 4ed5722e3e Python: switch dataflow library to new (shared) CFG + SSA
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>
2026-06-02 14:09:45 +00:00

95 lines
7.7 KiB
Plaintext

edges
| test.py:3:1:3:3 | BSC | test.py:7:19:7:21 | BSC | provenance | |
| test.py:3:1:3:3 | BSC | test.py:35:19:35:21 | BSC | provenance | |
| test.py:3:1:3:3 | BSC | test.py:66:19:66:21 | BSC | provenance | |
| test.py:3:7:3:51 | After Attribute() | test.py:3:1:3:3 | BSC | provenance | |
| test.py:7:5:7:15 | blob_client | test.py:8:5:8:15 | blob_client | provenance | |
| test.py:7:19:7:21 | BSC | test.py:7:19:7:42 | After Attribute() | provenance | Config |
| test.py:7:19:7:42 | After Attribute() | test.py:7:5:7:15 | blob_client | provenance | |
| test.py:8:5:8:15 | blob_client | test.py:9:5:9:15 | blob_client | provenance | |
| test.py:9:5:9:15 | [post] blob_client | test.py:11:9:11:19 | blob_client | provenance | |
| test.py:9:5:9:15 | blob_client | test.py:9:5:9:15 | [post] blob_client | provenance | Config |
| test.py:15:5:15:23 | blob_service_client | test.py:16:5:16:23 | blob_service_client | provenance | |
| test.py:15:27:15:71 | After Attribute() | test.py:15:5:15:23 | blob_service_client | provenance | |
| test.py:16:5:16:23 | blob_service_client | test.py:17:5:17:23 | blob_service_client | provenance | |
| test.py:17:5:17:23 | [post] blob_service_client | test.py:19:19:19:37 | blob_service_client | provenance | |
| test.py:17:5:17:23 | blob_service_client | test.py:17:5:17:23 | [post] blob_service_client | provenance | Config |
| test.py:19:5:19:15 | blob_client | test.py:21:9:21:19 | blob_client | provenance | |
| test.py:19:19:19:37 | blob_service_client | test.py:19:19:19:58 | After Attribute() | provenance | Config |
| test.py:19:19:19:58 | After Attribute() | test.py:19:5:19:15 | blob_client | provenance | |
| test.py:25:5:25:20 | container_client | test.py:26:5:26:20 | container_client | provenance | |
| test.py:25:24:25:66 | After Attribute() | test.py:25:5:25:20 | container_client | provenance | |
| test.py:26:5:26:20 | container_client | test.py:27:5:27:20 | container_client | provenance | |
| test.py:27:5:27:20 | [post] container_client | test.py:29:19:29:34 | container_client | provenance | |
| test.py:27:5:27:20 | container_client | test.py:27:5:27:20 | [post] container_client | provenance | Config |
| test.py:29:5:29:15 | blob_client | test.py:31:9:31:19 | blob_client | provenance | |
| test.py:29:19:29:34 | container_client | test.py:29:19:29:55 | After Attribute() | provenance | Config |
| test.py:29:19:29:55 | After Attribute() | test.py:29:5:29:15 | blob_client | provenance | |
| test.py:35:5:35:15 | blob_client | test.py:36:5:36:15 | blob_client | provenance | |
| test.py:35:19:35:21 | BSC | test.py:35:19:35:42 | After Attribute() | provenance | Config |
| test.py:35:19:35:42 | After Attribute() | test.py:35:5:35:15 | blob_client | provenance | |
| test.py:36:5:36:15 | blob_client | test.py:37:5:37:15 | blob_client | provenance | |
| test.py:37:5:37:15 | [post] blob_client | test.py:43:9:43:19 | blob_client | provenance | |
| test.py:37:5:37:15 | blob_client | test.py:37:5:37:15 | [post] blob_client | provenance | Config |
| test.py:66:5:66:15 | blob_client | test.py:67:5:67:15 | blob_client | provenance | |
| test.py:66:19:66:21 | BSC | test.py:66:19:66:42 | After Attribute() | provenance | Config |
| test.py:66:19:66:42 | After Attribute() | test.py:66:5:66:15 | blob_client | provenance | |
| test.py:67:5:67:15 | blob_client | test.py:68:5:68:15 | blob_client | provenance | |
| test.py:68:5:68:15 | [post] blob_client | test.py:69:12:69:22 | blob_client | provenance | |
| test.py:68:5:68:15 | blob_client | test.py:68:5:68:15 | [post] blob_client | provenance | Config |
| test.py:69:12:69:22 | blob_client | test.py:73:10:73:33 | After get_unsafe_blob_client() | provenance | |
| test.py:73:5:73:6 | bc | test.py:75:9:75:10 | bc | provenance | |
| test.py:73:10:73:33 | After get_unsafe_blob_client() | test.py:73:5:73:6 | bc | provenance | |
nodes
| test.py:3:1:3:3 | BSC | semmle.label | BSC |
| test.py:3:7:3:51 | After Attribute() | semmle.label | After Attribute() |
| test.py:7:5:7:15 | blob_client | semmle.label | blob_client |
| test.py:7:19:7:21 | BSC | semmle.label | BSC |
| test.py:7:19:7:42 | After Attribute() | semmle.label | After Attribute() |
| test.py:8:5:8:15 | blob_client | semmle.label | blob_client |
| test.py:9:5:9:15 | [post] blob_client | semmle.label | [post] blob_client |
| test.py:9:5:9:15 | blob_client | semmle.label | blob_client |
| test.py:11:9:11:19 | blob_client | semmle.label | blob_client |
| test.py:15:5:15:23 | blob_service_client | semmle.label | blob_service_client |
| test.py:15:27:15:71 | After Attribute() | semmle.label | After Attribute() |
| test.py:16:5:16:23 | blob_service_client | semmle.label | blob_service_client |
| test.py:17:5:17:23 | [post] blob_service_client | semmle.label | [post] blob_service_client |
| test.py:17:5:17:23 | blob_service_client | semmle.label | blob_service_client |
| test.py:19:5:19:15 | blob_client | semmle.label | blob_client |
| test.py:19:19:19:37 | blob_service_client | semmle.label | blob_service_client |
| test.py:19:19:19:58 | After Attribute() | semmle.label | After Attribute() |
| test.py:21:9:21:19 | blob_client | semmle.label | blob_client |
| test.py:25:5:25:20 | container_client | semmle.label | container_client |
| test.py:25:24:25:66 | After Attribute() | semmle.label | After Attribute() |
| test.py:26:5:26:20 | container_client | semmle.label | container_client |
| test.py:27:5:27:20 | [post] container_client | semmle.label | [post] container_client |
| test.py:27:5:27:20 | container_client | semmle.label | container_client |
| test.py:29:5:29:15 | blob_client | semmle.label | blob_client |
| test.py:29:19:29:34 | container_client | semmle.label | container_client |
| test.py:29:19:29:55 | After Attribute() | semmle.label | After Attribute() |
| test.py:31:9:31:19 | blob_client | semmle.label | blob_client |
| test.py:35:5:35:15 | blob_client | semmle.label | blob_client |
| test.py:35:19:35:21 | BSC | semmle.label | BSC |
| test.py:35:19:35:42 | After Attribute() | semmle.label | After Attribute() |
| test.py:36:5:36:15 | blob_client | semmle.label | blob_client |
| test.py:37:5:37:15 | [post] blob_client | semmle.label | [post] blob_client |
| test.py:37:5:37:15 | blob_client | semmle.label | blob_client |
| test.py:43:9:43:19 | blob_client | semmle.label | blob_client |
| test.py:66:5:66:15 | blob_client | semmle.label | blob_client |
| test.py:66:19:66:21 | BSC | semmle.label | BSC |
| test.py:66:19:66:42 | After Attribute() | semmle.label | After Attribute() |
| test.py:67:5:67:15 | blob_client | semmle.label | blob_client |
| test.py:68:5:68:15 | [post] blob_client | semmle.label | [post] blob_client |
| test.py:68:5:68:15 | blob_client | semmle.label | blob_client |
| test.py:69:12:69:22 | blob_client | semmle.label | blob_client |
| test.py:73:5:73:6 | bc | semmle.label | bc |
| test.py:73:10:73:33 | After get_unsafe_blob_client() | semmle.label | After get_unsafe_blob_client() |
| test.py:75:9:75:10 | bc | semmle.label | bc |
subpaths
#select
| test.py:11:9:11:19 | blob_client | test.py:3:7:3:51 | After Attribute() | test.py:11:9:11:19 | blob_client | Unsafe usage of v1 version of Azure Storage client-side encryption |
| test.py:21:9:21:19 | blob_client | test.py:15:27:15:71 | After Attribute() | test.py:21:9:21:19 | blob_client | Unsafe usage of v1 version of Azure Storage client-side encryption |
| test.py:31:9:31:19 | blob_client | test.py:25:24:25:66 | After Attribute() | test.py:31:9:31:19 | blob_client | Unsafe usage of v1 version of Azure Storage client-side encryption |
| test.py:43:9:43:19 | blob_client | test.py:3:7:3:51 | After Attribute() | test.py:43:9:43:19 | blob_client | Unsafe usage of v1 version of Azure Storage client-side encryption |
| test.py:75:9:75:10 | bc | test.py:3:7:3:51 | After Attribute() | test.py:75:9:75:10 | bc | Unsafe usage of v1 version of Azure Storage client-side encryption |