Software security vulnerabilities can lead to severe consequences, making early detection essential. Although code review serves as a critical defense mechanism against security flaws, relevant feedback remains scarce due to limited attention to security issues or a lack of expertise among reviewers. Existing datasets and studies primarily focus on general-purpose code review comments, either lacking security-specific annotations or being too limited in scale to support large-scale research. To bridge this gap, we introduce \textbf{SeRe}, a \textbf{security-related code review dataset}, constructed using an active learning-based ensemble classification approach. The proposed approach iteratively refines model predictions through human annotations, achieving high precision while maintaining reasonable recall. Using the fine-tuned ensemble classifier, we extracted 6,732 security-related reviews from 373,824 raw review instances, ensuring representativeness across multiple programming languages. Statistical analysis indicates that SeRe generally \textbf{aligns with real-world security-related review distribution}. To assess both the utility of SeRe and the effectiveness of existing code review comment generation approaches, we benchmark state-of-the-art approaches on security-related feedback generation. By releasing SeRe along with our benchmark results, we aim to advance research in automated security-focused code review and contribute to the development of more effective secure software engineering practices.


翻译:软件安全漏洞可能导致严重后果,因此早期检测至关重要。尽管代码审查是防范安全缺陷的关键机制,但由于审查者对安全问题的关注不足或缺乏专业知识,相关反馈仍然稀缺。现有数据集和研究主要集中于通用代码审查评论,要么缺乏安全专项标注,要么规模过于有限而无法支持大规模研究。为填补这一空白,我们引入了\textbf{SeRe},这是一个\textbf{安全相关代码审查数据集},采用基于主动学习的集成分类方法构建。该方法通过人工标注迭代优化模型预测,在保持合理召回率的同时实现了高精度。使用微调后的集成分类器,我们从373,824条原始审查实例中提取了6,732条安全相关审查,确保了跨多种编程语言的代表性。统计分析表明,SeRe总体上\textbf{与真实世界安全相关审查的分布对齐}。为评估SeRe的实用性及现有代码审查评论生成方法的有效性,我们在安全相关反馈生成任务上对前沿方法进行了基准测试。通过发布SeRe及基准测试结果,我们旨在推动自动化安全导向代码审查的研究,并为开发更有效的安全软件工程实践做出贡献。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
AI生成代码缺陷综述
专知会员服务
15+阅读 · 2025年12月8日
《使用静态污点分析检测恶意代码》CMU最新30页slides
专知会员服务
21+阅读 · 2023年10月11日
Python图像处理,366页pdf,Image Operators Image Processing in Python
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员