SecVulEval / README.md
arag0rn's picture
Update README.md
c1f60f6 verified
---
license: mit
dataset_info:
features:
- name: idx
dtype: int64
- name: project
dtype: string
- name: project_url
dtype: string
- name: filepath
dtype: string
- name: commit_id
dtype: string
- name: commit_message
dtype: string
- name: is_vulnerable
dtype: bool
- name: hash
dtype: string
- name: func_name
dtype: string
- name: func_body
dtype: string
- name: changed_lines
dtype: string
- name: changed_statements
dtype: string
- name: cve_list
sequence: string
- name: cwe_list
sequence: string
- name: fixed_func_idx
dtype: int64
- name: context
struct:
- name: Execution Environment
sequence: string
- name: Explanation
sequence: string
- name: External Function
sequence: string
- name: Function Argument
sequence: string
- name: Globals
sequence: string
- name: Type Execution Declaration
sequence: string
splits:
- name: train
num_bytes: 119514243
num_examples: 25440
download_size: 30875803
dataset_size: 119514243
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
---
# Dataset Card for Dataset Name
SecVulEval is a collection of real-world C/C++ vulnerabilities.
## Dataset Details
### Dataset Description
The dataset is curated by collecting C/C++ vulnerability from NVD. It features statement-level vulnerable information, context information for vulnerable functions
(`is_vulnerable=True`), and other metadata such as CVE, CWE, commit information. The dataset contains vulnerable and non-vulnerable function samples.
<!-- - **Curated by:** [More Information Needed]
- **Funded by [optional]:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Language(s) (NLP):** [More Information Needed]
- **License:** [More Information Needed] -->
### Dataset Sources
The vulnerabilities (CVEs) are collected from NVD (https://nvd.nist.gov). Then, the corresponding patches to the vulnerabilities are collected from their
respective git repositories.
<!-- - **Repository:** [More Information Needed]
- **Paper [optional]:** [More Information Needed]
- **Demo [optional]:** [More Information Needed] -->
## Uses
The dataset comprises both vulnerable (43.23%) and non-vulnerable (56.77%) functions, with a total collection of 25,440 function. This large collection of functions make
it suitable for training vulnerability detection model. The statement-level info, along with contextual information can make context-aware detection at finer-grained
level possible. The dataset can also be used to evaluate C/C++ vulnerability detection models.
<!-- ### Direct Use
<!-- This section describes suitable use cases for the dataset. -->
<!-- [More Information Needed] -->
<!-- ### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
<!-- [More Information Needed] -->
## Dataset Structure
The dataset has 15 different fields.
- The `project_url` column has 735 different values while the `project` column has 707 unique values.
This is because for `project == "Android"`, there are multiple different repositories.
- The `changed_lines` and `changed_statements` columns include the changes in made in the patch as a list of (line, code) pair.
Vulnerable functions include the deleted lines/statements and the non-vulnerable functions has the added lines/statements.
- Some functions/vulnerabilities can be assigned to more than one CVE/CWE which is why `cve_list` and `cwe_list` are given as lists, although in most cases there would be
only one CVE and CWE id.
- The `fixed_func_id` includes the `idx` number (first field in the dataset) of the corresponding fixed patch of a vulnerable function. This helps to easily pair the
vulnerable functions with their fixing code. For non-vulnerable code it doesn't make sense for a "fixed" version and the `fixed_func_id` is just itself.
- The `context` field includes contextual information for vulnerable functions according to the five categories as discussed in the paper. It is added as the list of
symbols and an explanation as generated by the LLM.
Other fields are self-explanatory.
<!-- [More Information Needed]
## Dataset Creation
### Curation Rationale
<!-- Motivation for the creation of this dataset. -->
<!-- [More Information Needed] -->
<!-- ### Source Data -->
<!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
<!-- #### Data Collection and Processing -->
<!-- This section describes the data collection and processing process such as data selection criteria, filtering and normalization methods, tools and libraries used, etc. -->
<!-- [More Information Needed] -->
<!-- #### Who are the source data producers? -->
<!-- This section describes the people or systems who originally created the data. It should also include self-reported demographic or identity information for the source data creators if this information is available. -->
<!-- [More Information Needed] -->
<!-- ### Annotations [optional]
<!-- If the dataset contains annotations which are not part of the initial data collection, use this section to describe them. -->
<!-- #### Annotation process -->
<!-- This section describes the annotation process such as annotation tools used in the process, the amount of data annotated, annotation guidelines provided to the annotators, interannotator statistics, annotation validation, etc. -->
<!-- [More Information Needed] -->
<!-- #### Who are the annotators?
<!-- This section describes the people or systems who created the annotations. -->
<!-- [More Information Needed] -->
<!-- #### Personal and Sensitive Information
<!-- State whether the dataset contains data that might be considered personal, sensitive, or private (e.g., data that reveals addresses, uniquely identifiable names or aliases, racial or ethnic origins, sexual orientations, religious beliefs, political opinions, financial or health data, etc.). If efforts were made to anonymize the data, describe the anonymization process. -->
<!-- [More Information Needed] -->
<!-- ## Bias, Risks, and Limitations -->
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
<!-- [More Information Needed] -->
<!-- ### Recommendations -->
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
<!-- Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations. -->
<!-- ## Citation [optional] -->
<!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
<!-- **BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed] -->
<!-- ## Glossary [optional] -->
<!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
<!-- [More Information Needed]
## More Information [optional]
[More Information Needed] -->
<!-- ## Dataset Card Authors [optional]
[More Information Needed]
## Dataset Card Contact
[More Information Needed] -->