SecurityEval Dataset: Mining Vulnerability Examples to Evaluate Machine Learning-Based Code Generation Techniques

被引:21
作者
Siddiq, Mohammed Latif [1 ]
Santos, Joanna C. S. [1 ]
机构
[1] Univ Notre Dame, Notre Dame, IN 46556 USA
来源
PROCEEDINGS OF THE 1ST INTERNATIONAL WORKSHOP ON MINING SOFTWARE REPOSITORIES APPLICATIONS FOR PRIVACY AND SECURITY, MSR4P&S 2022 | 2022年
关键词
dataset; common weakness enumeration; code generation; security;
D O I
10.1145/3549035.3561184
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Automated source code generation is currently a popular machine-learning-based task. It can be helpful for software developers to write functionally correct code from a given context. However, just like human developers, a code generation model can produce vulnerable code, which the developers can mistakenly use. For this reason, evaluating the security of a code generation model is a must. In this paper, we describe SECURITYEVAL, an evaluation dataset to fulfill this purpose. It contains 130 samples for 75 vulnerability types, which are mapped to the Common Weakness Enumeration (CWE). We also demonstrate using our dataset to evaluate one open-source (i.e., InCoder) and one closed-source code generation model (i.e., GitHub Copilot).
引用
收藏
页码:29 / 33
页数:5
相关论文
共 30 条
[1]   A Survey of Machine Learning for Big Code and Naturalness [J].
Allamanis, Miltiadis ;
Barr, Earl T. ;
Devanbu, Premkumar ;
Sutton, Charles .
ACM COMPUTING SURVEYS, 2018, 51 (04)
[2]  
[Anonymous], 2022, CodeQL
[3]  
[Anonymous], 2022, Stack Overflow Developer Survey 2022
[4]  
Arzt S, 2014, ACM SIGPLAN NOTICES, V49, P259, DOI [10.1145/2594291.2594299, 10.1145/2666356.2594299]
[5]  
Bandit Developers, 2022, Bandit
[6]  
Cass S., 2022, TOP PROGRAMMING LANG
[7]  
Chen M., 2021, arXiv
[8]   A C/C plus plus Code Vulnerability Dataset with Code Changes and CVE Summaries [J].
Fan, Jiahao ;
Li, Yi ;
Wang, Shaohua ;
Nguyen, Tien N. .
2020 IEEE/ACM 17TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2020, :508-512
[9]  
Fried D, 2023, Arxiv, DOI arXiv:2204.05999
[10]  
Gao Y., 2022, arXiv