DataFlow: Permit local flow between post-update nodes#20390
Merged
asgerf merged 2 commits intogithub:mainfrom Sep 16, 2025
Merged
DataFlow: Permit local flow between post-update nodes#20390asgerf merged 2 commits intogithub:mainfrom
asgerf merged 2 commits intogithub:mainfrom
Conversation
df85dfb to
5ebb9f0
Compare
5ebb9f0 to
ae4cf30
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes DataFlow consistency errors by allowing local flow between post-update nodes in the consistency checker. Previously, any local flow step that targeted a PostUpdateNode would be flagged as an error, but this change permits such flow when the source is also a PostUpdateNode, which commonly occurs in flow summaries where parameters are used as callback arguments.
- Modified the
postWithInFlowconsistency check to exclude flows from PostUpdateNode to PostUpdateNode - Removed numerous false positive consistency errors from test expected files
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll | Updated consistency check logic to allow PostUpdateNode-to-PostUpdateNode flow |
| javascript/ql/test/library-tests/FlowSummary/DataFlowConsistency.expected | Removed false positive errors for flow summary post-update nodes |
| cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected | Removed false positive errors for inner post-update nodes |
| cpp/ql/test/library-tests/dataflow/models-as-data/consistency.expected | Removed false positive error for summary post-update node |
| cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected | Removed false positive errors for inner post-update nodes |
| cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected | Removed false positive errors for inner post-update nodes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stops reporting local flow edges between post-update nodes as a consistency errors. Such flow tends to occur when parameters are used as callback arguments in a flow summary.
E.g fixes the consistency errors observed after adding the new flow summaries in #20375.