SeRe:一个与现实世界审查活动对齐的安全相关代码审查数据集
SeRe: A Security-Related Code Review Dataset Aligned with Real-World Review Activities
AI总结:
SeRe数据集通过主动学习方法构建,旨在解决安全相关代码审查反馈不足的问题,提供大规模、多语言的审查数据以促进安全审查自动化研究。
摘要:
软件安全漏洞可能导致严重后果,因此早期检测至关重要。尽管代码审查是防范安全缺陷的关键防御机制,但相关反馈仍然匮乏,这主要是由于对安全问题的关注有限或审查人员缺乏专业知识。现有数据集和研究主要集中在通用目的代码审查评论上,要么缺乏安全特定注释,要么规模太小,无法支持大规模研究。为了弥合这一差距,我们介绍了SeRe,一个安全相关代码审查数据集,通过基于主动学习的集成分类方法构建。所提出的方法通过人工注释迭代优化模型预测,实现高精度的同时保持合理的召回率。使用微调后的集成分类器,我们从373,824个原始审查实例中提取了6,732个安全相关的审查,确保在多种编程语言中具有代表性。统计分析表明,SeRe总体上与现实世界的安全相关审查分布相一致。为了评估SeRe的实用性以及现有代码审查评论生成方法的有效性,我们对最先进的方法进行了基准测试,以安全相关反馈生成为评估目标。通过发布SeRe以及我们的基准测试结果,我们旨在推动自动化安全导向代码审查的研究,并促进更有效的安全软件工程实践的发展。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。