arrow
返回

Large Language Models Versus Static Code Analysis Tools: A Systematic Benchmark for Vulnerability Detection

大型语言模型与静态代码分析工具: 漏洞检测的系统基准

delete2025-01-01
delete0
PRE
AI
D
Damian Gnieciak
T
Tomasz Szandała *
DOI:10.1109/ACCESS.2025.3635168delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
Modern software relies on a multitude of automated testing and quality assurance tools to prevent errors, bugs and potential vulnerabilities. This study sets out to provide a head-to-head, quantitative and qualitative evaluation of six automated approaches: three industry-standard rule-based static code-analysis tools (SonarQube, CodeQL and SnykCode) and three state-of-the-art large language models hosted on the GitHub Models platform (GPT-4.1, Mistral Large and DeepSeek V3). Using a curated suite of ten real-world C# projects that embed 63 vulnerabilities across common categories such as SQL injection, hard-coded secrets and outdated dependencies, we measure classical detection accuracy (precision, recall, F-score), analysis latency, and the developer effort required to vet true positives. The language-based scanners achieve higher mean F-1 scores,0.797, 0.753 and 0.750, than their static counterparts, which score 0.260, 0.386 and 0.546, respectively. LLMs' advantage originates from superior recall, confirming an ability to reason across broader code contexts. However, this benefit comes with substantial trade-offs: DeepSeek V3 exhibits the highest false-positive ratio, all language models mislocate issues at line-or-column granularity due to tokenisation artefacts. Overall, language models successfully rival traditional static analysers in finding real vulnerabilities. Still, their noisier output and imprecise localisation limit their standalone use in safety-critical audits. We therefore recommend a hybrid pipeline: employ language models early in development for broad, context-aware triage, while reserving deterministic rule-based scanners for high-assurance verification. The open benchmark and JSON-based result harness released with this paper lay a foundation for reproducible, practitioner-centric research into next-generation automated code security. ProjectAnalyzer Code and dataset are available on GitHub: https://github.com/Damian0401/MasterThesis
Keyword:
Codes
Large language models
Static analysis
Context modeling
Software development management
Source coding
Industries
Costs
Computer bugs
Benchmark testing
software engineering
CI/CD
software quality
err分享
err收藏
err分享
err收藏

期刊

IEEE Access 封面图
IEEE Access
IF:
3.6
论文数:
10.1W
被引数:
36.3W

机构

W
wroclaw university of science & technology
学者数:
7.4K
论文数: 7.1K
被引数: 5.6K
引用论文

引用论文

err
IF0
err
err0
PREAI
err
err分享
err收藏
Characterizing Commits in Open-Source Software
err
IF0
err2023-01-27
err0
PREAI
errMívian Ferreira; Diego Gonçalves; Mariza Bigonha; Kecia Ferreira
err分享
err收藏
Evaluating how static analysis tools can reduce code review effort
err2017-10-01
err0
PREAI
errDevarshi Singh; Varun Ramachandra Sekar; Kathryn T. Stolee; Brittany Johnson
err分享
err收藏
Uncovering Determinants of Code Quality in Education via Static Code Analysis
err2024-01-01
err0
errOAAI
errNikolic, Danilo; Stefanovic, Darko; Nikolic, Miroslav; Dakic, Dusanka; Stefanovic, Miroslav; Koprivica, Sara
err分享
err收藏
The role of software automation in improving industrial operations and efficiency
err2024-08-30
err0
PREAI
errDaniel Ajiga; Patrick Azuka Okeleke; Samuel Olaoluwa Folorunsho; Chinedu Ezeigweneme
err分享
err收藏
HalluLens: LLM Hallucination Benchmark
err2025-01-01
err0
PREAI
errBang,Yejin; Ji,Ziwei; Schelten,Alan; Hartshorn,Anthony; Fowler,Tara; Zhang,Cheng; Cancedda,Nicola; Fung,Pascale
err分享
err收藏
学者 查看更多内容