一句话:用主动学习集成分类构建大规模安全相关代码评审数据集 SeRe,并给出安全评审反馈生成基准。
软件安全漏洞后果严重,早期检测至关重要,而代码评审是抵御安全缺陷的关键防线。但由于评审者往往忽视安全问题或缺乏专业知识,安全相关的评审反馈十分稀缺;现有数据集和研究多聚焦通用代码评审评论,或缺少安全标注,或规模过小,难以支撑大规模研究。为填补这一空白,本文提出 SeRe——一个安全相关代码评审数据集,采用基于主动学习的集成分类方法构建:通过人工标注迭代精化模型预测,在保持较高精度的同时获得合理召回率。借助微调后的集成分类器,作者从 373,824 条原始评审实例中抽取了 6,732 条安全相关评审,覆盖多种编程语言,具有代表性。统计分析表明 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 SeRe, a 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 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.
@inproceedings{abs-2601-01042,
title = {SeRe: A Security-Related Code Review Dataset Aligned with Real-World Review Activities},
author = {Zixiao Zhao and Yanjie Jiang and Hui Liu and Kui Liu and Lu Zhang},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3744916.3764557}
}