update-codeql-query-dataflow-python

Migrate Python CodeQL queries from v1 to v2 dataflow APIs with 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-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-codeql-query-dataflow-python
Source: https://github.com/advanced-security/codeql-development-mcp-server/tree/main/.github/skills/update-codeql-query-dataflow-python
Command: npx skills add https://github.com/advanced-security/codeql-development-mcp-server --skill update-codeql-query-dataflow-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrate Python CodeQL queries from the legacy v1 dataflow API to the modern v2 shared dataflow API, ensuring compatibility by using DataFlow::ConfigSig modules and validating results with TDD.

Core Features & Use Cases

  • Phase-based migration guidance to convert Python dataflow code from v1 to v2 using DataFlow::ConfigSig.
  • Mechanisms for transforming Configuration-based predicates (DataFlow::Configuration, TaintTracking::Configuration) into modular DataFlow::ConfigSig implementations.
  • Python-specific dataflow handling guidance, including CFG/AST node representations and API graph considerations, with test-driven validation to preserve query results.
  • Renaming predicates and flow queries: isSanitizer -> isBarrier, isAdditionalTaintStep -> isAdditionalFlowStep, and replacing cfg.hasFlow(...) with module flow predicates.
  • Clear migration workflow alignment, including test baselines, phase guidance, and equivalence verification.

Quick Start

Start by establishing a baseline with codeql_test_run to capture current results, then follow the mechanical migration steps to convert v1 dataflow patterns to v2 while validating results.

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

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

FAQPage Schema
How do I migrate Python CodeQL dataflow queries from v1 to v2?

Migrate Python CodeQL queries by converting legacy DataFlow::Configuration or TaintTracking::Configuration into modular DataFlow::ConfigSig implementations, using a test-driven workflow to ensure query results remain equivalent.

What is the difference between CodeQL dataflow v1 and v2 predicate names?

In CodeQL dataflow v2 migration, the isSanitizer predicate is renamed to isBarrier, and isAdditionalTaintStep is renamed to isAdditionalFlowStep to align with the shared dataflow API.

How do I replace cfg.hasFlow when updating CodeQL dataflow to v2?

When updating CodeQL dataflow to v2, replace cfg.hasFlow(...) calls with the new module flow predicates provided by the DataFlow::ConfigSig module structure.

Does CodeQL dataflow v2 migration support Python-specific AST and CFG nodes?

Yes, CodeQL dataflow v2 migration handles Python-specific dataflow nodes, including CFG and AST node representations as well as API graph considerations during the conversion process.

What is the best way to verify CodeQL query results after migrating to v2 dataflow?

The best way to verify CodeQL query results after migrating to v2 dataflow is to establish a baseline with codeql_test_run before migration, then validate equivalence against those results after converting configurations to modules.