Skip to content

Conversation

@owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Nov 27, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 27, 2025 16:44
@owen-mc owen-mc requested review from a team as code owners November 27, 2025 16:44
Copilot finished reviewing on behalf of owen-mc November 27, 2025 16:46
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 addresses small issues identified by data flow consistency checks in the Go language implementation. The main focus is on fixing the reverseRead consistency check violations, which occur when a read step exists from node a to a.b, node a.b has a post-update node, but node a is missing its post-update node.

Key Changes

  • Extended post-update node generation for method call receivers to include all implicit field reads in promoted field access chains
  • Refactored skipImplicitFieldReads in FlowSummaryImpl.qll to use a new utility predicate lookThroughImplicitFieldRead
  • Added exclusion predicates to the Go consistency checks for known acceptable edge cases
  • Fixed an SSA implementation issue where adjacent variable references could incorrectly include self-loops

Reviewed changes

Copilot reviewed 63 out of 64 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll Added localFlowIsLocalExclude exclusion predicate and documentation for reverseRead check
go/ql/lib/semmle/go/dataflow/internal/DataFlowImplConsistency.qll Implemented Go-specific exclusion predicates for consistency checks
go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll Extended post-update node creation to handle promoted field access chains using transitive closure
go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll Refactored to use new IR::lookThroughImplicitFieldRead utility predicate
go/ql/lib/semmle/go/dataflow/SsaImpl.qll Added condition to prevent self-loops in adjacent variable reference detection
go/ql/lib/semmle/go/controlflow/IR.qll Added lookThroughImplicitFieldRead utility predicate for consistent field read navigation
go/ql/consistency-queries/UnexpectedFrontendErrors.ql Moved query to consistency-queries directory
go/ql/lib/change-notes/2025-11-26-unexpected-frontend-errors-query-moved.md Change note documenting the query move
go/Makefile Updated consistency queries path references
Multiple .expected files Updated test expectations with reverseRead consistency check results

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

---
category: breaking
---
* The query `go/unexpected-frontend-error` has been moved from the `codeql/go-queries` query to the `codeql-go-consistency-queries` query pack.
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

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

There is a double space between "query" and "to" in the change note.

Suggested change
* The query `go/unexpected-frontend-error` has been moved from the `codeql/go-queries` query to the `codeql-go-consistency-queries` query pack.
* The query `go/unexpected-frontend-error` has been moved from the `codeql/go-queries` query to the `codeql-go-consistency-queries` query pack.

Copilot uses AI. Check for mistakes.
@owen-mc owen-mc marked this pull request as draft November 27, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant