Skip to content

FlowSummaryImpl: Model more source/sink steps as jump steps - #22470

Merged
MathiasVP merged 2 commits into
github:mainfrom
hvitved:flow-summary-source-sink-jump-step
Sep 3, 2026
Merged

FlowSummaryImpl: Model more source/sink steps as jump steps#22470
MathiasVP merged 2 commits into
github:mainfrom
hvitved:flow-summary-source-sink-jump-step

Conversation

@hvitved

@hvitvedhvitved commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Modeling more source/sink steps as jump steps instead of local steps means that we avoid skipping over nodes that we would like to see in the path graph. For example, in

let callback = |x| sink(x);// ^ A// ^ Bpass_source_into_callback(callback)// ^^^^^^^^ C

we would previously get a direct edge C -> B, but now we instead get two edges C -> A and A -> B.

@hvitved
hvitvedforce-pushed the flow-summary-source-sink-jump-step branch from 001b6cd to 4144ee0CompareAugust 31, 2026 14:08
@github-actionsgithub-actionsBot added the Rust Pull requests that update Rust code label Aug 31, 2026
@hvitved
hvitvedforce-pushed the flow-summary-source-sink-jump-step branch from 4144ee0 to c0610f0CompareSeptember 1, 2026 07:29
@hvitved
hvitvedforce-pushed the flow-summary-source-sink-jump-step branch from c0610f0 to 78dce11CompareSeptember 1, 2026 08:27
@hvitvedhvitved added the no-change-note-required This PR does not need a change note label Sep 1, 2026
@hvitved
hvitved marked this pull request as ready for review September 1, 2026 11:37
CopilotAI balanced review requested due to automatic review settings September 1, 2026 11:37
@hvitved
hvitved requested review from a team as code ownersSeptember 1, 2026 11:37

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The unrelated Windows CI-status filtering should be reverted, separated, or documented.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
SeverityFinding
Medium severitymisc/​scripts/​accept-expected-changes-from-ci.py — This changes contributor tooling outside the PR's stated flow-summary scope: Windows language-test…
What changed in this PR

Refines flow-summary path graphs so callback and parameter nodes remain visible.

Changes:

  • Reclassifies source/sink boundary steps as jump steps where appropriate.
  • Updates Rust and C++ path expectations.
  • Modifies CI expected-output tooling, including Windows status filtering.
FileDescription
shared/​dataflow/​codeql/​dataflow/​internal/​FlowSummaryImpl.qllRefines source/sink step classification.
rust/​ql/​test/​query-tests/​security/​CWE-918/​RequestForgery.expectedUpdates request-forgery paths.
rust/​ql/​test/​query-tests/​security/​CWE-117/​LogInjection.expectedUpdates log-injection paths.
rust/​ql/​test/​query-tests/​security/​CWE-079/​warp/​XSS.expectedUpdates Warp XSS paths.
rust/​ql/​test/​query-tests/​security/​CWE-079/​axum/​XSS.expectedUpdates Axum XSS paths.
rust/​ql/​test/​query-tests/​security/​CWE-079/​actix/​XSS.expectedUpdates Actix XSS paths.
rust/​ql/​test/​library-tests/​dataflow/​sources/​web_frameworks/​InlineFlow.expectedRecords intermediate web-framework nodes.
rust/​ql/​test/​library-tests/​dataflow/​sources/​database/​InlineFlow.expectedRecords intermediate database callback nodes.
rust/​ql/​test/​library-tests/​dataflow/​models/​models.expectedUpdates modeled-flow paths.
misc/​scripts/​accept-expected-changes-from-ci.pyChanges log retrieval and Windows filtering.
cpp/​ql/​test/​library-tests/​dataflow/​external-models/​flow.expectedUpdates external-model paths.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

lang_test_failures: List[GithubStatus] = list()
for status in newest_status.values():
if " Language Tests" in status.context or status.context in supported_internal_status_language_test_names:
if " Language Tests" in status.context and not " Language Tests Windows" in status.context or status.context in supported_internal_status_language_test_names:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't as big as a deal as Copilot is making it out to be (since this is just a script we can run locally). However, what's the motivation for excluding language tests on Windows here (at least .. I think that's what's going on)?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was causing issues for me when running the script on this PR where it failed to generate diffs related to windows file paths. Not sure exactly why though...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough!

@hvitved
hvitvedforce-pushed the flow-summary-source-sink-jump-step branch from 78dce11 to d64ad79CompareSeptember 1, 2026 14:06

@MathiasVPMathiasVP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The QL changes (and expected) looks good to me! My only question is that change to the Python script.

@MathiasVP
MathiasVP merged commit c970d43 into github:mainSep 3, 2026
108 checks passed
@hvitved
hvitved deleted the flow-summary-source-sink-jump-step branch September 3, 2026 14:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C++DataFlow Libraryno-change-note-requiredThis PR does not need a change noteRustPull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hvitved@MathiasVP