Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/codeql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 741d78e
Choose a base ref
...
head repository: github/codeql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 490544d
Choose a head ref
  • 2 commits
  • 76 files changed
  • 2 contributors

Commits on Jun 22, 2026

  1. Python: deprecate AstNode.getAFlowNode() and rewrite internal callers

    Preparatory refactor for the shared-CFG dataflow migration.
    
    Deprecates the AstNode.getAFlowNode() cached predicate on the public
    Python QL API and rewrites all ~140 internal callers across lib/, src/,
    test/, and tools/ from `expr.getAFlowNode() = cfgNode` to
    `cfgNode.getNode() = expr`, using ControlFlowNode.getNode() which
    already exists in Flow.qll.
    
    The predicate itself is preserved (with a deprecation note pointing at
    the new pattern) so external users do not experience churn — they can
    migrate at their own pace and the AST/CFG hierarchies still get the
    intended untangling once the deprecation eventually elapses.
    
    Semantic noop verified by:
    - All 361 lib/ + src/ queries compile clean.
    - All 122 ControlFlow + PointsTo library-tests pass.
    - All 64 dataflow library-tests pass.
    - All 113 Variables/Exceptions/Expressions/Statements/Functions/Imports/
      Security/CWE-798/ModificationOfParameterWithDefault query-tests pass.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    Copilot authored and yoff committed Jun 22, 2026
    Configuration menu
    Copy the full SHA
    16e23e6 View commit details
    Browse the repository at this point in the history
  2. Python: deprecate Function.getAReturnValueFlowNode() and rewrite inte…

    …rnal callers
    
    Follow-up to the getAFlowNode deprecation in the same PR: same AST→legacy-CFG
    bridge pattern. The 11 internal call sites (across objects/, types/,
    frameworks/, and TypeTrackingImpl) are rewritten to bind a `Return ret`
    explicitly, then constrain via `ret.getScope() = f and n.getNode() = ret.getValue()`.
    
    The predicate itself is preserved with a deprecation note so external
    users do not experience churn.
    
    Semantic noop.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    yoff and Copilot committed Jun 22, 2026
    Configuration menu
    Copy the full SHA
    490544d View commit details
    Browse the repository at this point in the history
Loading