This paper presents the results of finetuning large language models (LLMs) for the task of detecting vulnerabilities in source code. We leverage WizardCoder, a recent improvement of the state-of-the-art LLM StarCoder, and adapt it for vulnerability detection through further finetuning. To accelerate training, we modify WizardCoder's training procedure, also we investigate optimal training regimes. For the imbalanced dataset with many more negative examples than positive, we also explore different techniques to improve classification performance. The finetuned WizardCoder model achieves improvement in ROC AUC and F1 measures on balanced and imbalanced vulnerability datasets over CodeBERT-like model, demonstrating the effectiveness of adapting pretrained LLMs for vulnerability detection in source code. The key contributions are finetuning the state-of-the-art code LLM, WizardCoder, increasing its training speed without the performance harm, optimizing the training procedure and regimes, handling class imbalance, and improving performance on difficult vulnerability detection datasets. This demonstrates the potential for transfer learning by finetuning large pretrained language models for specialized source code analysis tasks.
Improving LLM Reasoning for Vulnerability Detection via Group Relative Policy Optimization
Institute of Informatics and Telematics, National Research Council of Italy(意大利国家研究理事会信息与电信研究所);Department of Excellence in Robotics and AI, TeCIP, Scuola Superiore Sant'Anna(卓越机器人与人工智能系,TeCIP,圣安娜高等学院)
ESCORT: Ethereum Smart COntRacTs Vulnerability Detection using Deep Neural Network and Transfer Learning
University of Würzburg(维尔茨堡大学);University of California, San-Diego(加利福尼亚大学圣地亚哥分校);Technical University of Darmstadt(达姆施塔特工业大学);University of California, San Diego(加利福尼亚大学圣地亚哥分校)
Generalization-Enhanced Code Vulnerability Detection via Multi-Task Instruction Fine-Tuning
School of Cyber Science and Engineering, Huazhong University of Science and Technology(华中科技大学网络空间科学与技术学院);College of Computer, National University of Defense Technology(国防科技大学计算机学院);School of Computer Science and Technology, Huazhong University of Science and Technology(华中科技大学计算机科学与技术学院)
LProtector: An LLM-driven Vulnerability Detection System
University of Pennsylvania(宾夕法尼亚大学);University of Electronic Science & Technology of China(电子科技大学);Texas A&M University(德克萨斯农工大学);Georgetown University(乔治城大学);Northern Arizona University(北亚利桑那大学);LG Energy Solution (Nanjing) Co., Ltd(LG新能源(南京)有限公司)
ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detection
School of Automation, Guangdong University of Technology(广东科技大學自動化學院);College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics(南京航空航天大學計算機科學與技術學院);School of Cyberspace Science and Technology, Beijing Jiaotong University(北京交通大學網絡空間科學與技術學院);School of Computer Science and Technology, Guangdong University of Technology(廣東科技大學計算機科學與技術學院);College of Computing and Data Science, Nanyang Technological University(南洋理工大學計算與數據科學學院)
VulDetectBench: Evaluating the Deep Capability of Vulnerability Detection with Large Language Models
Institute of BigData, Fudan University(复旦大学大数据研究院);School of Computer Science, Fudan University(复旦大学计算机科学学院);School of Computer Science, Huazhong University of Science and Technology(华中科技大学计算机科学学院);Purple Mountain Laboratories(紫金山实验室);School of Software Engineering, Huazhong University of Science and Technology(华中科技大学软件学院)
Comparison of Static Application Security Testing Tools and Large Language Models for Repo-level Vulnerability Detection
Singapore Management University(新加坡管理大学);Hanoi University of Science and Technology(河内理工大学);The University of Melbourne(墨尔本大学);University of Melbourne(墨尔本大学)
VulDeePecker: A Deep Learning-Based System for Vulnerability Detection
Huazhong University of Science and Technology(华中科技大学);Hebei University(河北大学);Shenzhen Huazhong University of Science and Technology Research Institute(深圳华中科技大学研究院);University of Texas at San Antonio(德克萨斯大学圣安东尼奥分校)
软件漏洞的自动检测是一个重要的研究课题。然而,该问题的现有解决方案依赖于人类专家来定义特征,并且经常错过许多漏洞(即,导致高假阴性率)。在本文中,我们开始研究使用基于深度学习的漏洞检测,以减轻人类专家手动定义特征的繁琐和主观任务。由于深度学习的动机是处理与漏洞检测问题非常不同的问题,因此我们需要一些将深度学习应用于漏洞检测的指导原则。特别是,我们需要找到适合深度学习的软件程序的表示。为此,我们建议使用代码小工具来表示程序,然后将它们转换为向量,其中代码小工具是一些(不一定是连续的)代码行,这些代码行在语义上彼此相关。这导致了一个基于深度学习的漏洞检测系统的设计和实现,称为Vulnerability Deep Pecker(VulDeepPecker)。为了评估VulDeePecker,我们为深度学习方法提供了第一个漏洞数据集。实验结果表明,VulDeePecker可以实现比其他方法少得多的假阴性(具有合理的假阳性)。我们进一步将VulDeePecker应用于3个软件产品(即Xen,Pionkey和Libav),并检测到4个漏洞,这些漏洞在国家漏洞数据库中没有报告,但在发布这些产品的后续版本时被供应商“默默”修补;相比之下,这些漏洞几乎完全被我们实验的其他漏洞检测系统所遗漏。
$μ$VulDeePecker: A Deep Learning-Based System for Multiclass Vulnerability Detection
Huazhong University of Science and Technology(华中科技大学);Shenzhen Huazhong University of Science and Technology Research Institute(深圳华中科技大学研究院);University of Texas at San Antonio(德克萨斯大学圣安东尼奥分校)
Dual-view Aware Smart Contract Vulnerability Detection for Ethereum
Institute of Cyberspace Security, Zhejiang University of Technology(浙江工业大学网络空间安全研究院);Binjiang Institute of Artificial Intelligence, ZJUT(浙江工业大学滨江人工智能研究院)
When Less is Enough: Positive and Unlabeled Learning Model for Vulnerability Detection
Harbin Institute of Technology(哈尔滨工业大学);Central University of Finance and Economics(中央财经大学);Nanyang Technological University(南洋理工大学);Peng Cheng Laboratory(鹏城实验室)