Combining LLM and Dynamic Analysis for Universal Testing of Static Application Security Testing Tools
Huaien Zhang, Yu Pei, Hao Chen, Shin Hwei Tan
Key points
From the paper's conclusion- We present LLM4SAST, the first universal framework detecting faults in SAST tools using large language models and dynamic feedback.
Abstract
Static application security testing (SAST) tools help detect potential software vulnerabilities, but they themselves contain faults undermining reliability and usability. Automated testing can address these issues, yet current techniques suffer from limited program transformation diversity and lack mechanisms to verify generated variants, leading to reduced fault detection and high manual effort. We present LLM4SAST, the first universal framework detecting faults in SAST tools using large language models and dynamic feedback. Our key insight is leveraging LLMs to understand and transform code in diverse programming languages. We design novel metamorphic relations with transformations to guide variant generation, using an LLM to produce multi-language variants that satisfy these relations. To reduce erroneous variants and identify unique faults, we propose two heuristics: dynamic-feedback-driven selection and program-differencing-based clustering. For each metamorphic relation, a report-centric test oracle detects variants that fail tests and identifies underlying faults by differentially analyzing SAST reports of the seed program and its variants. LLM4SAST identified 66 unique faults across six SAST tools, with 32 confirmed or fixed after being reported to developers, demonstrating effectiveness. The proposed heuristics eliminate 47.8% of false positives, and LLM4SAST detects 3.4 times more faults while requiring only 39.8% of the variants compared to existing approaches.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Sifting the Noise: A Comparative Study of LLM Agents in Vulnerability False Positive FilteringProceedings of the ACM on Software Engineering · 2026
- Helping LLMs improve code generation using feedback from testing and static analysisDiscover Artificial Intelligence · 2026
- Self-Evolving Static Analysis via LLM Pseudo-LabelingarXiv · 2026
- Preserve the Vulnerability, Break the Alert: Testing the Robustness of CodeQL Taint Tracking with Natural RewritesarXiv · 2026
- VulnSAGE: Adjudicating SAST Reports by Connecting LLM Reasoning to Program StructurearXiv · 2026
- Test vs Mutant: Adversarial LLM Agents for Robust Unit Test GenerationProceedings of the ACM on software engineering. · 2026