Rebecca De Rosa
A Hybrid Multi-Agent Architecture for Enhancing CodeQL Static Analysis with Large Language Models.
Rel. Danilo Giordano, Matteo Boffa. Politecnico di Torino, Master of science program in Cybersecurity, 2026
|
Preview |
PDF (Tesi_di_laurea)
- Thesis
Licence: Creative Commons Attribution Non-commercial No Derivatives. Download (1MB) | Preview |
Abstract
Software vulnerabilities remain a critical challenge, with tens of thousands of Common Vulnerability and Exposure (CVEs) recorded annually. Static analysis tools like CodeQL offer scalable, deterministic detection through pre-determined rule-based queries, but they are limited in contextual reasoning and novel vulnerability patterns, while fully LLM-based approaches raise concerns regarding reproducibility, cost, and integration within established DevSecOps pipelines. This thesis proposes a hybrid three-agent architecture that uses LLMs to augment CodeQL rather than replace it. An Analyzer agent validates CodeQL results through autonomous reasoning on source code, quadrupling CodeQL’s F1-score on a labeled Python dataset (0.43 vs 0.11). A Suggestor agent identifies coverage gaps by analysing false negatives and generating structured improvement proposals, and a Creator agent synthesises new CodeQL queries based on these proposals, successfully targeting missing sources, sinks, and taint-propagation steps for CWE-89 and CWE-79.
Preliminary LLM-as-judge evaluation confirmed high gap coverage (4-5/5), thought generated queries required manual refinement to compile due to syntactic issues (2-3/5 syntactic correctness)
Relators
Academic year
Publication type
Number of Pages
Course of studies
Classe di laurea
Ente in cotutela
Aziende collaboratrici
URI
![]() |
Modify record (reserved for operators) |
