cpg-analysis

Trace data flows and verify vulnerabilities using Code Property Graphs and CPGQL.

22|3|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/allsmog/vuln-scout --skill cpg-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpg-analysis
Source: https://github.com/allsmog/vuln-scout/tree/main/whitebox-pentest/skills/cpg-analysis
Command: npx skills add https://github.com/allsmog/vuln-scout --skill cpg-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides advanced code analysis capabilities by leveraging Code Property Graphs (CPGs) to understand complex data flows and identify vulnerabilities that traditional methods miss.

Core Features & Use Cases

  • Deep Data Flow Analysis: Trace user input from source to sink across functions and files.
  • Vulnerability Verification: Use CPGQL queries (e.g., with Joern) to confirm or deny potential security flaws.
  • Semantic Code Understanding: Go beyond pattern matching to understand the actual execution paths and data dependencies within your codebase.
  • Use Case: Verify if a user-controlled input in a web application can reach a database query function, confirming a potential SQL injection vulnerability with high confidence.

Quick Start

Use the cpg-analysis skill to find all data flow paths from request parameters to database query calls.

Frequently Asked Questions about cpg-analysis

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

FAQPage Schema
What is a Code Property Graph and how does it improve vulnerability verification?

A Code Property Graph (CPG) combines AST, CFG, and PDG structures to map execution paths and data dependencies. It improves vulnerability verification by enabling semantic code understanding beyond pattern matching, allowing precise confirmation of security flaws.

How do I trace user input from source to sink using CPGQL?

To trace user input from source to sink, you query the Code Property Graph using CPGQL. This deep data flow analysis tracks parameters across functions and files, allowing you to confirm if user-controlled input reaches sensitive functions.

Can I use cpg-analysis to detect SQL injection paths in a web application?

Yes, you can use cpg-analysis to detect SQL injection paths. By analyzing data flows from request parameters to database query calls, it verifies if user-controlled input can reach execution sinks, confirming potential vulnerabilities with high confidence.

Does Joern support deep data flow analysis across multiple files?

Yes, Joern supports deep data flow analysis across multiple files. By constructing Code Property Graphs, it traces user input from source to sink across functions and files, enabling precise identification of security flaws through CPGQL queries.

Why use Code Property Graph analysis instead of traditional pattern matching?

Code Property Graph analysis provides semantic code understanding instead of traditional pattern matching. By analyzing AST, CFG, and PDG together, it identifies actual execution paths and data dependencies, revealing complex vulnerabilities that traditional methods miss.

What are the limitations of CPGQL queries for vulnerability verification?

CPGQL queries require constructing comprehensive Code Property Graphs to understand data dependencies and execution paths. While highly precise for vulnerability verification, limitations arise if the CPG fails to capture all execution paths or incomplete semantic code understanding.