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, Corso di laurea magistrale in Cybersecurity, 2026
|
Preview |
PDF (Tesi_di_laurea)
- Tesi
Licenza: 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)
Relatori
Anno Accademico
Tipo di pubblicazione
Numero di pagine
Corso di laurea
Classe di laurea
Ente in cotutela
Aziende collaboratrici
URI
![]() |
Modifica (riservato agli operatori) |
