update-codeql-query-dataflow-ruby

Migrate Ruby CodeQL queries from v1 dataflow API to v2 DataFlow::ConfigSig modules.

30|3|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/advanced-security/codeql-development-mcp-server --skill update-codeql-query-dataflow-ruby
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-codeql-query-dataflow-ruby
Source: https://github.com/advanced-security/codeql-development-mcp-server/tree/main/.github/skills/update-codeql-query-dataflow-ruby
Command: npx skills add https://github.com/advanced-security/codeql-development-mcp-server --skill update-codeql-query-dataflow-ruby

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrates Ruby CodeQL queries from the legacy v1 dataflow API to the modern v2 shared dataflow API, ensuring detection logic remains equivalent through test-driven development (TDD).

Core Features & Use Cases

  • Provides a mechanical path to convert v1 DataFlow::Configuration usage to v2 DataFlow::ConfigSig modules for Ruby.
  • Establishes a test-driven migration workflow that preserves query results, enabling safe transitions across Ruby dataflow patterns and Rails/gem integrations.
  • Documents Ruby-specific migration patterns, including CFG node handling, API graphs for framework usage, and metaprogramming awareness for flow tracking.

Quick Start

Write a migration plan that converts your Ruby dataflow configuration to a v2 module, runs existing tests to establish baselines, and validates result equivalence after the transformation.

Frequently Asked Questions about update-codeql-query-dataflow-ruby

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Ruby CodeQL queries from v1 dataflow to the v2 shared dataflow API?

To migrate Ruby CodeQL queries to v2 dataflow, convert DataFlow::Configuration usage to DataFlow::ConfigSig modules and rename predicates like isSanitizer to isBarrier. Replace cfg.hasFlow with the module flow predicate and run baseline tests to validate result equivalence.

What is the difference between DataFlow::Configuration and DataFlow::ConfigSig in Ruby CodeQL?

DataFlow::Configuration is the legacy v1 API, while DataFlow::ConfigSig is the modern v2 shared dataflow module structure for Ruby CodeQL. Migrating to ConfigSig modules enables standardized taint-tracking and flow analysis across Ruby dataflow patterns including Rails and gem integrations.

Can I preserve existing test results when converting Ruby CodeQL dataflow configurations to modules?

Yes, you can preserve test results during Ruby CodeQL dataflow migration by establishing baseline test outputs before transformation. Run existing tests against the v1 configuration, then validate result equivalence after converting to DataFlow::ConfigSig modules to ensure detection logic remains unchanged.

Does the Ruby CodeQL v2 dataflow migration handle metaprogramming and framework-specific flow tracking?

The Ruby CodeQL v2 dataflow migration addresses metaprogramming awareness for flow tracking, CFG node handling, and API graphs for framework usage. These patterns ensure Rails and gem integrations maintain accurate taint-tracking after converting to DataFlow::ConfigSig modules.

Why does cfg.hasFlow need to be replaced in Ruby CodeQL dataflow migration?

The cfg.hasFlow predicate from v1 must be replaced with the module flow predicate during Ruby CodeQL dataflow migration to v2. This change supports the DataFlow::ConfigSig module structure and ensures the shared dataflow API handles flow paths correctly.