基于开源注入的漏洞代码数据集生成框架

Shasha Zhang
{"title":"基于开源注入的漏洞代码数据集生成框架","authors":"Shasha Zhang","doi":"10.1109/ICAICA52286.2021.9497888","DOIUrl":null,"url":null,"abstract":"Evaluation benchmark plays an important role in the design of defect detection algorithms and tools. Especially with the development of deep learning techniques, code defect detection models based on deep neural network requires a large number of training and testing cases. Existing test cases are far from meeting the requirements of new algorithm design and verification. On the one hand, the number of test cases designed manually or collected from open source projects is small. On the other hand, the test cases generated automatically according to rules have similar pattern, high redundancy and simple structure. This paper proposes an algorithm of code defect injection and test case generation based on open source projects. The basic idea is to find reaching definitions in open source projects, and modify the source code according to the analysis results, so as to generate defect dataset with a large number of test cases that have similar feature to open source codes. This paper selects 8 open source projects to verify the proposed method and generates more than 6,000 null pointer dereference test cases in total. We use existing tools to evaluate the injected test cases and the results show that the proposed method can generate a large number of high-quality test cases.","PeriodicalId":121979,"journal":{"name":"2021 IEEE International Conference on Artificial Intelligence and Computer Applications (ICAICA)","volume":"126 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-06-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"A Framework of Vulnerable Code Dataset Generation by Open-Source Injection\",\"authors\":\"Shasha Zhang\",\"doi\":\"10.1109/ICAICA52286.2021.9497888\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Evaluation benchmark plays an important role in the design of defect detection algorithms and tools. Especially with the development of deep learning techniques, code defect detection models based on deep neural network requires a large number of training and testing cases. Existing test cases are far from meeting the requirements of new algorithm design and verification. On the one hand, the number of test cases designed manually or collected from open source projects is small. On the other hand, the test cases generated automatically according to rules have similar pattern, high redundancy and simple structure. This paper proposes an algorithm of code defect injection and test case generation based on open source projects. The basic idea is to find reaching definitions in open source projects, and modify the source code according to the analysis results, so as to generate defect dataset with a large number of test cases that have similar feature to open source codes. This paper selects 8 open source projects to verify the proposed method and generates more than 6,000 null pointer dereference test cases in total. We use existing tools to evaluate the injected test cases and the results show that the proposed method can generate a large number of high-quality test cases.\",\"PeriodicalId\":121979,\"journal\":{\"name\":\"2021 IEEE International Conference on Artificial Intelligence and Computer Applications (ICAICA)\",\"volume\":\"126 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2021-06-28\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2021 IEEE International Conference on Artificial Intelligence and Computer Applications (ICAICA)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICAICA52286.2021.9497888\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE International Conference on Artificial Intelligence and Computer Applications (ICAICA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICAICA52286.2021.9497888","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

摘要

评估基准在缺陷检测算法和工具的设计中起着重要的作用。特别是随着深度学习技术的发展,基于深度神经网络的代码缺陷检测模型需要大量的训练和测试用例。现有的测试用例远远不能满足新算法设计和验证的要求。一方面,手工设计或从开源项目中收集的测试用例的数量很少。另一方面,根据规则自动生成的测试用例具有模式相似、冗余度高、结构简单等特点。本文提出了一种基于开源项目的代码缺陷注入和测试用例生成算法。其基本思想是在开源项目中寻找可达到的定义,并根据分析结果修改源代码,从而生成含有大量与开源代码具有相似特征的测试用例的缺陷数据集。本文选取了8个开源项目来验证所提出的方法,共生成了6000多个空指针解引用测试用例。我们使用现有的工具对注入的测试用例进行评估,结果表明所提出的方法可以生成大量高质量的测试用例。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
A Framework of Vulnerable Code Dataset Generation by Open-Source Injection
Evaluation benchmark plays an important role in the design of defect detection algorithms and tools. Especially with the development of deep learning techniques, code defect detection models based on deep neural network requires a large number of training and testing cases. Existing test cases are far from meeting the requirements of new algorithm design and verification. On the one hand, the number of test cases designed manually or collected from open source projects is small. On the other hand, the test cases generated automatically according to rules have similar pattern, high redundancy and simple structure. This paper proposes an algorithm of code defect injection and test case generation based on open source projects. The basic idea is to find reaching definitions in open source projects, and modify the source code according to the analysis results, so as to generate defect dataset with a large number of test cases that have similar feature to open source codes. This paper selects 8 open source projects to verify the proposed method and generates more than 6,000 null pointer dereference test cases in total. We use existing tools to evaluate the injected test cases and the results show that the proposed method can generate a large number of high-quality test cases.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信