--- arxiv: 1807.0432 dataset_info: features: - name: functionSource dtype: string - name: CWE-119 dtype: bool - name: CWE-120 dtype: bool - name: CWE-469 dtype: bool - name: CWE-476 dtype: bool - name: CWE-other dtype: bool - name: combine dtype: int64 splits: - name: train num_bytes: 832092463 num_examples: 1019471 - name: validation num_bytes: 104260416 num_examples: 127476 - name: test num_bytes: 104097361 num_examples: 127419 download_size: 535360739 dataset_size: 1040450240 configs: - config_name: default data_files: - split: train path: data/train-* - split: validation path: data/validation-* - split: test path: data/test-* task_categories: - text-classification tags: - code --- This is an unofficial HuggingFace version of "[Draper VDISC Dataset - Vulnerability Detection in Source Code](https://osf.io/d45bw/)" dataset from "[Automated Vulnerability Detection in Source Code Using Deep Representation Learning](https://arxiv.org/abs/1807.04320)". *** Draper VDISC Dataset - Vulnerability Detection in Source Code The dataset consists of the source code of 1.27 million functions mined from open source software, labeled by static analysis for potential vulnerabilities. For more details on the dataset and benchmark results, see https://arxiv.org/abs/1807.04320. The data is provided in three HDF5 files corresponding to an 80:10:10 train/validate/test split, matching the splits used in our paper. The combined file size is roughly 1 GB. Each function's raw source code, starting from the function name, is stored as a variable-length UTF-8 string. Five binary 'vulnerability' labels are provided for each function, corresponding to the four most common CWEs in our data plus all others: ``` CWE-120 (3.7% of functions) CWE-119 (1.9% of functions) CWE-469 (0.95% of functions) CWE-476 (0.21% of functions) CWE-other (2.7% of functions) ``` Functions may have more than one detected CWE each. Please cite our paper if you use this dataset in a publication: https://arxiv.org/abs/1807.04320 This project was sponsored by the Air Force Research Laboratory (AFRL) as part of the DARPA MUSE (https://www.darpa.mil/program/mining-and-understanding-software-enclaves) program. About Draper (https://www.draper.com) - Draper is an independent, not-for-profit corporation, which means its primary commitment is to the success of customers' missions rather than to shareholders. For either government or private sector customers, Draper leverages its deep experience and innovative thinking to be an effective engineering research and development partner, designing solutions or objectively evaluating the ideas or products of others. Draper will partner with other organizations — from large for-profit prime contractors, to government agencies, to university researchers — in a variety of capacities. Services Draper provides range from concept development through delivered solution and lifecycle support. Draper's multidisciplinary teams of engineers and scientists can deliver useful solutions to even the most critical problems.