PDG Query Example Cookbook
tools/ir/examples/ contains ready-to-run Cypher queries for lotus-ir-pdg-query.
Location: tools/ir/examples/
Contents:
primitives.cypherfor basic node and edge exploration.dataflow.cypherandsecurity.cypherfor flow-oriented triage.metrics.cypheranddebug-info.cypherfor inspection and reporting.static-analysis.cypherfor analysis-oriented query patterns.agent-guidance.cypherfor LLM-agent-guided PDG exploration primitives.security/— categorized security analysis patterns:injection.cypher— Command injection: system/popen/exec sinks + input source tracingmemory.cypher— Use-after-free, double-free, memory leaksunsafe-libc.cypher— strcpy/gets/sprintf, format string, buffer overflowresource.cypher— File handle leaks, lock/unlock, mmap/munmapdouble-free.cypher— Double-free, use-after-free, new/delete mismatchtaint.cypher— Input-to-sink taint tracking, format string, argument tracing
The directory acts as a practical cookbook for users learning the PDG query language.
See also PDG Query – Program Dependence Graph Queries and PDG Query Language (Cypher).