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

跨领域评估基于变换器的漏洞检测在开源与行业数据中的表现

Cross-Domain Evaluation of Transformer-Based Vulnerability Detection on Open & Industry Data

Free University of Bozen-Bolzano(博尔扎诺自由大学);Würth Phoenix(伍尔特凤凰)

Moritz Mock, Thomas Forrer, Barbara Russo

AI总结:

本文评估了基于变换器的漏洞检测模型在不同数据集上的表现,开发了集成到CI/CD中的推荐系统以提升漏洞检测效率。

摘要:

深度学习提出的漏洞检测解决方案在学术研究中并不总是对开发人员可用,其在工业环境中的适用性也鲜有探讨。将这些技术从学术界转移到工业界面临信任、遗留系统、数字素养不足以及学术与工业专业知识差距等挑战。对于深度学习而言,性能和将其整合到现有工作流程中的问题也是额外的担忧。在本工作中,我们首先评估了CodeBERT在工业和开源软件中检测漏洞的功能性能。我们分析了其在使用开源数据微调并在工业数据上测试时的跨领域泛化能力,以及反之亦然,并探索了处理类别不平衡的策略。基于这些结果,我们开发了AI-DO(自动化漏洞检测集成用于开发者操作)系统,这是一个整合到持续集成-持续部署(CI/CD)中的推荐系统,利用微调后的CodeBERT在代码审查过程中检测和定位漏洞,而不会干扰工作流程。最后,我们通过与公司IT专业人员的调查评估了该工具的感知有用性。我们的结果表明,训练在工业数据上的模型在同一领域内能够准确检测漏洞,但在开源代码上表现下降,而一个在开源数据上微调的深度学习模型,通过适当的欠采样技术,可以提高漏洞检测的效果。

英文摘要:

Deep learning solutions for vulnerability detection proposed in academic research are not always accessible to developers, and their applicability in industrial settings is rarely addressed. Transferring such technologies from academia to industry presents challenges related to trustworthiness, legacy systems, limited digital literacy, and the gap between academic and industrial expertise. For deep learning in particular, performance and integration into existing workflows are additional concerns. In this work, we first evaluate the performance of CodeBERT for detecting vulnerable functions in industrial and open-source software. We analyse its cross-domain generalisation when fine-tuned on open-source data and tested on industrial data, and vice versa, also exploring strategies for handling class imbalance. Based on these results, we develop AI-DO(Automating vulnerability detection Integration for Developers' Operations), a Continuous Integration-Continuous Deployment (CI/CD)-integrated recommender system that uses fine-tuned CodeBERT to detect and localise vulnerabilities during code review without disrupting workflows. Finally, we assess the tool's perceived usefulness through a survey with the company's IT professionals. Our results show that models trained on industrial data detect vulnerabilities accurately within the same domain but lose performance on open-source code, while a deep learner fine-tuned on open data, with appropriate undersampling techniques, improves the detection of vulnerabilities.

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

↑