arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.15212cs.CR
收藏

大语言模型与SAST:关于GPT4-高级数据分析编码漏洞检测的技术分析

LLM vs. SAST: A Technical Analysis on Detecting Coding Bugs of GPT4-Advanced Data Analysis

Edinburgh Napier University(爱丁堡纳皮尔大学);The George Washington University(乔治华盛顿大学);Capgemini Deutschland GmbH(凯捷德国有限公司)

Madjid G. Tehrani, Eldar Sultanow, William J. Buchanan, Mahkame Houmani, Christel H. Djaha Fodja

AI总结:

研究对比GPT-4与两个SAST工具在32个安全场景的编码漏洞检测,用二元规则评分、逻辑或基线聚合结果,经McNemar检验,发现GPT-4检测性能更优,还讨论了将其集成到安全软件开发工作流程的相关要点。

摘要:

大语言模型(LLMs)越来越多地用于代码理解,但其相对于静态应用程序安全测试(SAST)在漏洞检测方面的实际有效性仍未得到充分量化。我们对GPT-4(高级数据分析)与两个SAST工具(SonarQube和Cloud Defence)在32个代表常见编码陷阱的安全场景上进行了对照比较研究。每个场景用二元检测规则评分,SAST的两个输出用逻辑或基线聚合,并用McNemar检验评估配对结果的统计显著性。在数据集中,GPT-4正确检测出32个场景中的30个(93.75%),而聚合的SAST基线检测出32个中的11个。配对比较显示检测性能上有统计学显著差异,有利于GPT-4。我们还讨论了将基于LLM的漏洞扫描集成到安全软件开发工作流程中的安全考虑和操作限制。

英文摘要:

Large language models (LLMs) are increasingly used for code understanding, yet their practical effectiveness for vulnerability detection relative to Static Application Security Testing (SAST) remains insufficiently quantified. We present a controlled comparative study between GPT-4 (Advanced Data Analysis) and two SAST tools (SonarQube and Cloud Defence) on 32 curated security scenarios representing common coding pitfalls. Each scenario is scored with a binary detection rule, the two SAST outputs are aggregated using a logical OR baseline, and paired outcomes are evaluated using McNemar's test for statistical significance. In our dataset, GPT-4 correctly detected 30 of 32 scenarios (93.75\%), while the aggregated SAST baseline detected 11 of 32. The paired comparison shows a statistically significant difference in detection performance in favour of GPT-4. We also discuss security considerations and operational constraints for integrating LLM-enhanced vulnerability scanning into secure software development workflows.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑