Skip to content

Ruby: Switch regex tracking from TypeTracking to DataFlow. - #22296

Open
aschackmull wants to merge 2 commits into
github:mainfrom
aschackmull:ruby/regex-via-dataflow
Open

Ruby: Switch regex tracking from TypeTracking to DataFlow.#22296
aschackmull wants to merge 2 commits into
github:mainfrom
aschackmull:ruby/regex-via-dataflow

Conversation

@aschackmull

Copy link
Copy Markdown
Contributor

Dca on #22256 highlighted a lot of imprecision in regex tracking. This PR attempts to improve this by simply swapping the flow computation from TypeTracking to DataFlow.

Copilot AI balanced review requested due to automatic review settings August 7, 2026 11:34
@aschackmull
aschackmull requested a review from a team as a code owner August 7, 2026 11:34
@github-actions github-actions Bot added the Ruby label Aug 7, 2026

Copilot AI 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.

Pull request overview

Switches Ruby regular-expression tracking from custom type tracking to stateful global data flow for improved precision.

Changes:

  • Adds string and regular-expression flow states.
  • Replaces custom tracking machinery with GlobalWithState.
Show a summary per file
File Description
ruby/ql/lib/codeql/ruby/regexp/internal/RegExpTracking.qll Implements stateful data-flow-based regex tracking.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@aschackmull
aschackmull force-pushed the ruby/regex-via-dataflow branch from 0a0ac9e to a2b6c1f Compare August 7, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants