Lune

FSE2022顶会

Generating realistic vulnerabilities via neural code editing: an empirical study

Yu Nong, Yuzhe Ou, Michael Pradel, Feng Chen, Haipeng Cai

摘要

The availability of large-scale, realistic vulnerability datasets is essential both for benchmarking existing techniques and for developing effective new data-driven approaches for software security. Yet such datasets are critically lacking. A promising solution is to generate such datasets by injecting vulnerabilities into real-world programs, which are richly available. Thus, in this paper, we explore the feasibility of vulnerability injection through neural code editing. With a synthetic dataset and a real-world one, we investigate the potential and gaps of three state-of-the-art neural code editors for vulnerability injection. We find that the studied editors have critical limitations on the real-world dataset, where the best accuracy is only 10.03%, versus 79.40% on the synthetic dataset. While the graph-based editors are more effective (successfully injecting vulnerabilities in up to 34.93% of real-world testing samples) than the sequence-based one (0 success), they still suffer from complex code structures and fall short for long edits due to their insufficient designs of the preprocessing and deep learning (DL) models. We reveal the promise of neural code editing for generating realistic vulnerable samples, as they help boost the effectiveness of DL-based vulnerability detectors by up to 49.51% in terms of F1 score. We also provide insights into the gaps in current editors (e.g., they are good at deleting but not at replacing code) and actionable suggestions for addressing them (e.g., designing effective editing primitives).

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 13 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • TFix: Learning to Fix Coding Errors with a Text-to-Text Transformer 引用了 Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
  • VULGEN: Realistic Vulnerability Generation Via Pattern Mining and Deep Learning 引用了 TFix: Learning to Fix Coding Errors with a Text-to-Text Transformer
  • Coca: Improving and Explaining Graph Neural Network-Based Vulnerability Detection Systems 引用了 VULGEN: Realistic Vulnerability Generation Via Pattern Mining and Deep Learning
  • Coca: Improving and Explaining Graph Neural Network-Based Vulnerability Detection Systems 引用了 Vulnerability detection with fine-grained interpretations
  • Coca: Improving and Explaining Graph Neural Network-Based Vulnerability Detection Systems 引用了 Data Quality for Software Vulnerability Datasets
  • Graph-based, Self-Supervised Program Repair from Diagnostic Feedback 引用了 Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs
  • Data Quality for Software Vulnerability Datasets 引用了 Vulnerability detection with fine-grained interpretations
  • Large Language Models for Code: Security Hardening and Adversarial Testing 引用了 Data Quality for Software Vulnerability Datasets
  • CrystalBLEU: Precisely and Efficiently Measuring the Similarity of Code 引用了 Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper13

  1. Data Quality for Software Vulnerability DatasetsRoland Croft, Muhammad Ali Babar, M. Mehdi KholoosiICSE 2023 · 138 次引用
  2. Large Language Models for Code: Security Hardening and Adversarial TestingJingxuan He, Martin T. VechevCCS 2023 · 98 次引用
  3. CrystalBLEU: Precisely and Efficiently Measuring the Similarity of CodeAryaz Eghbali, Michael PradelASE 2022 · 33 次引用
  4. VULGEN: Realistic Vulnerability Generation Via Pattern Mining and Deep LearningYu Nong, Yuzhe Ou, Michael Pradel, Feng Chen 等ICSE 2023 · 32 次引用
  5. Coca: Improving and Explaining Graph Neural Network-Based Vulnerability Detection SystemsSicong Cao, Xiaobing Sun, Xiaoxue Wu, David Lo 等ICSE 2024 · 27 次引用

它引用的 Paper13

  1. Vulnerability detection with fine-grained interpretationsYi Li, Shaohua Wang, Tien N. NguyenFSE 2021 · 283 次引用
  2. Hoppity: Learning Graph Transformations to Detect and Fix Bugs in ProgramsElizabeth Dinella, Hanjun Dai, Ziyang Li, Mayur Naik 等ICLR 2020 · 212 次引用
  3. Graph-based, Self-Supervised Program Repair from Diagnostic FeedbackMichihiro Yasunaga, Percy LiangICML 2020 · 198 次引用
  4. Adversarial examples for models of codeNoam Yefet, Uri Alon, Eran YahavOOPSLA 2020 · 162 次引用
  5. TFix: Learning to Fix Coding Errors with a Text-to-Text TransformerBerkay Berabi, Jingxuan He, Veselin Raychev, Martin T. VechevICML 2021 · 143 次引用

相关 Paper

  1. VGX: Large-Scale Sample Generation for Boosting Learning-Based Software Vulnerability AnalysesYu Nong, Richard Fang, Guangbei Yi, Kunsong Zhao 等ICSE 2024 · 23 次引用
  2. Exploring and Improving Real-World Vulnerability Data Generation via Prompting Large Language ModelsGuangbei Yi, Yu Nong, Minzhang Li, Haipeng CaiICSE 2026
  3. LLMxCPG: Context-Aware Vulnerability Detection Through Code Property Graph-Guided Large Language ModelsAhmed Lekssays, Hamza Mouhcine, Khang Tran, Ting Yu 等USENIX Security 2025
  4. Are We Learning the Right Features? A Framework for Evaluating DL-Based Software Vulnerability Detection SolutionsSatyaki Das, Syeda Tasnim Fabiha, Saad Shafiq, Nenad MedvidovicICSE 2025 · 1 次引用
  5. Out of Distribution, Out of Luck: How Well Can LLMs Trained on Vulnerability Datasets Detect Top 25 CWE Weaknesses?Yikun Li, Ngoc Tan Bui, Ting Zhang, Chengran Yang 等ICSE 2026 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖