CleanVul / README.md
yikun-li's picture
Update README.md
74b2fda verified
---
# Dataset card metadata (Hugging Face Hub)
language:
- en
task_categories:
- text-classification
- other
tags:
- security
- vulnerability-detection
- code
- program-analysis
- software-engineering
- llm
pretty_name: CleanVul
dataset_type: code
---
# Dataset Card for CleanVul
CleanVul is a function-level vulnerability dataset derived from vulnerability-fixing commits. It provides paired *before/after* function snapshots and metadata produced by an LLM-assisted heuristic pipeline (VulSifter) to identify which changed functions are likely to correspond to vulnerability fixes.
## Dataset Details
CleanVul targets the noise present in many vulnerability datasets that label all modified files or functions in vulnerability-fixing commits as vulnerability-related. The dataset is constructed by applying VulSifter, which combines LLM-based semantic inspection with filtering heuristics (e.g., to remove test-related changes). CleanVul is released in multiple confidence “threshold” variants so users can trade off dataset size and label correctness.
- **Curated by:** Yikun Li, Ting Zhang, Ratnadira Widyasari, Yan Naing Tun, Huu Hung Nguyen, Tan Bui, Ivana Clairine Irsan, Yiran Cheng, Xiang Lan, Han Wei Ang, et al.
- **Language(s):** Source code (multilingual). Reported language coverage includes Java, Python, C, JavaScript, C#, and C++.
- **Paper:** arXiv:2411.17274 (CleanVul: Automatic Function-Level Vulnerability Detection in Code Commits Using LLM Heuristics)
## Dataset Structure
CleanVul is released in multiple score-based CSV files. Pairs are stored separately by vulnerability score and can be combined to form thresholded subsets:
- `vulnerability_score_3.csv`: items with score = 3
- `vulnerability_score_4.csv`: items with score = 4
To reconstruct the commonly used “Threshold 3” subset (score ≥ 3), combine:
- score = 3 (6,368 items) + score = 4 (1,830 items) = 8,198 items
## Citation
```bibtex
@article{li2024cleanvul,
title={CleanVul: Automatic Function-Level Vulnerability Detection in Code Commits Using LLM Heuristics},
author={Li, Yikun and Zhang, Ting and Widyasari, Ratnadira and Tun, Yan Naing and Nguyen, Huu Hung and Bui, Tan and Irsan, Ivana Clairine and Cheng, Yiran and Lan, Xiang and Ang, Han Wei and others},
journal={arXiv preprint arXiv:2411.17274},
year={2024}
}