D2A: A Dataset Built for AI-Based Vulnerability Detection Methods Using Differential Analysis

Yunhui Zheng, Saurabh Pujar, Burn Lewis, Luca Buratti, Edward Epstein +4 more
2/16/2021
cs.SEcs.AIcs.LG
benchmark-dataset

Official code: IBM/D2A (78 stars, Python, Apache-2.0, last commit 2022-05-27).

Abstract

Static analysis tools are widely used for vulnerability detection as they understand programs with complex behavior and millions of lines of code. Despite their popularity, static analysis tools are known to generate an excess of false positives.

Show full abstract

The recent ability of Machine Learning models to understand programming languages opens new possibilities when applied to static analysis. However, existing datasets to train models for vulnerability identification suffer from multiple limitations such as limited bug context, limited size, and synthetic and unrealistic source code. We propose D2A, a differential analysis based approach to label issues reported by static analysis tools. The D2A dataset is built by analyzing version pairs from multiple open source projects. From each project, we select bug fixing commits and we run static analysis on the versions before and after such commits. If some issues detected in a before-commit version disappear in the corresponding after-commit version, they are very likely to be real bugs that got fixed by the commit. We use D2A to generate a large labeled dataset to train models for vulnerability identification. We show that the dataset can be used to build a classifier to identify possible false alarms among the issues reported by static analysis, hence helping developers prioritize and investigate potential true positives first.

View on arXivView PDF

Code Implementations(1)

IBM/D2AOfficial100%
Apache-2.0

This repository is to support contributions for tools and new data entries for the D2A dataset hosted in DAX

7821Python, ShellFeb 5, 20214 years agoApache-2.0

Similar Papers

Cite this paper

@article{zheng2021da,
  title  = {D2A: A Dataset Built for AI-Based Vulnerability Detection Methods Using Differential Analysis},
  author = {Yunhui Zheng and Saurabh Pujar and Burn Lewis and Luca Buratti and Edward Epstein and Bo Yang and Jim Laredo and Alessandro Morari and Zhong Su},
  year   = {2021},
  eprint = {2102.07995},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.07995}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.07995.svg)](https://codeofpaper.com/paper/2102.07995)

Discussion