Skip to content

Conversation

@hvitved
Copy link
Contributor

@hvitved hvitved commented Jan 13, 2026

Removes some data flow inconsistencies, as confirmed by DCA.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jan 13, 2026
@hvitved hvitved force-pushed the rust/restrict-implicit-deref-borrow-nodes branch from 2ec7f37 to 55d4902 Compare January 13, 2026 19:23
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Jan 14, 2026
@hvitved hvitved marked this pull request as ready for review January 14, 2026 08:04
@hvitved hvitved requested a review from a team as a code owner January 14, 2026 08:04
@hvitved hvitved requested review from Copilot and geoffw0 January 14, 2026 08:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restricts ImplicitDerefBorrowNode instances to only those expressions that have an enclosing CFG scope, addressing data flow inconsistencies identified in DCA issue #34054.

Changes:

  • Narrowed type from AstNode to Expr for implicit deref/borrow node representations
  • Added hasEnclosingCfgScope() guards to node type constructors to ensure proper CFG scope association
  • Renamed internal methods and variables to reflect the more specific Expr type

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
rust/ql/lib/codeql/rust/dataflow/internal/Node.qll Updated ImplicitDerefBorrowNode and related classes to use Expr instead of AstNode, added CFG scope checks in type constructors, and renamed methods/variables accordingly
rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll Updated DataFlowCall methods to use Expr instead of AstNode and added CFG scope check to TImplicitDerefCall constructor

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hvitved hvitved merged commit 991d30f into github:main Jan 14, 2026
27 checks passed
@hvitved hvitved deleted the rust/restrict-implicit-deref-borrow-nodes branch January 14, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants