QLCoder: A Query Synthesizer For Static Analysis of Security Vulnerabilities
cs.CR, cs.PL, cs.SE
Submitted: 2025-11-11
Updated: 2026-08-26
Code: https://github.com/neuralprogram/qlcoder
License: http://creativecommons.org/licenses/by/4.0/
The gist: Static analysis tools provide a powerful means to detect security vulnerabilities by specifying queries that encode vulnerable code patterns.
Terminology
Abstract
Static analysis tools provide a powerful means to detect security vulnerabilities by specifying queries that encode vulnerable code patterns. However, writing such queries is challenging and requires diverse expertise in security and program analysis. To address this challenge, we present QLCoder - an agentic framework that automatically synthesizes queries in CodeQL, a powerful static analysis engine, directly from a given CVE metadata. QLCode embeds an LLM in a synthesis loop with execution feedback, while constraining its reasoning using a custom MCP interface that allows structured interaction with a Language Server Protocol (for syntax guidance) and a RAG database (for semantic retrieval of queries and documentation). This approach allows QLCoder to generate syntactically and semantically valid security queries. We evaluate QLCode on 176 existing CVEs across 111 Java projects. Building upon the Claude Code agent framework, QLCoder synthesizes correct queries that detect the CVE in the vulnerable but not in the patched versions for 53.4% of CVEs. In comparison, using only Claude Code synthesizes 10% correct queries. QLCoder code is available publicly at https://github.com/neuralprogram/QLCoder.
Sources
- Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMs
- Neuro-symbolic Static Analysis with LLM-generated Vulnerability Patterns
- IRIS: LLM-Assisted Static Analysis for Detecting Security Vulnerabilities
- KNighter: Transforming Static Analysis with LLM-Synthesized Checkers
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
Related papers
- SoK: AI-Augmented Binary Reversing
- Relaxed Sender Anonymity for CBDC Interbank Settlement: A Zero-Knowledge Approach on Permissioned EVM
- Calibration-Family Overfit: Why Trusted Sabotage Monitors Don't Transfer Across Lineages
- Efficient Fuzzy PSI under One-Sided Assumptions
- Sealing the Audit-Runtime Gap for LLM Skills
- Token Composition: A Graph Based on EVM Logs