Datasets:
|
Download README.md from SWH-0025/vulnerability-specifications: direct link, hf CLI and curl.
- Browser
- Download file 3.38 kB
-
https://huggingface.co/datasets/SWH-0025/vulnerability-specifications/resolve/main/README.md
- Command line
-
hf download hf://datasets/SWH-0025/vulnerability-specifications/README.md
-
curl -L -o README.md https://huggingface.co/datasets/SWH-0025/vulnerability-specifications/resolve/main/README.md
3.38 kB
| license: apache-2.0 | |
| pretty_name: VulInstruct Specification Dataset | |
| task_categories: | |
| - text-classification | |
| tags: | |
| - vulnerability-detection | |
| - security | |
| - CVE | |
| - code-analysis | |
| - specification | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: data/train-* | |
| dataset_info: | |
| features: | |
| - name: cve_id | |
| dtype: string | |
| - name: cve_description | |
| dtype: string | |
| - name: repository | |
| dtype: string | |
| - name: commit_hash | |
| dtype: string | |
| - name: patch_commit_msg | |
| dtype: string | |
| - name: specifications | |
| sequence: string | |
| - name: understand | |
| dtype: string | |
| - name: threat_model | |
| dtype: string | |
| - name: vulnerability_analysis | |
| dtype: string | |
| - name: solution_analysis | |
| dtype: string | |
| - name: split | |
| dtype: string | |
| - name: case_id | |
| dtype: string | |
| splits: | |
| - name: train | |
| num_bytes: 18719704 | |
| num_examples: 1999 | |
| download_size: 8226159 | |
| dataset_size: 18719704 | |
| # VulInstruct: Specification-Guided Vulnerability Detection 🔒 | |
| <p align="center"> | |
| 📄 <a href="https://huggingface.co/papers/2511.04014" target="_blank">Paper</a> | | |
| 🤗 <a href="https://huggingface.co/datasets/hzhu721/vulnerability-specifications" target="_blank">Dataset</a> | | |
| 💻 <a href="https://github.com/zhuhaopku/VulInstruct-temp" target="_blank">GitHub</a> | |
| </p> | |
| ## Introduction | |
| This repository contains the **Specification Knowledge Base** introduced in the paper [VulInstruct: Teaching LLMs Root-Cause Reasoning for Vulnerability Detection via Security Specifications](https://huggingface.co/papers/2511.04014). | |
| VulInstruct is a specification-guided approach that systematically extracts security specifications—expectations about how code should behave to remain safe—from historical vulnerabilities. The dataset consists of 1,999 high-quality vulnerability-specification pairs designed to help Large Language Models (LLMs) reason about expected safe behaviors rather than relying on surface patterns. | |
| The dataset includes: | |
| - **General specifications**: fundamental safe behaviors captured from high-quality patches across various projects. | |
| - **Domain-specific specifications**: expectations derived from repeated violations within particular repositories. | |
| ## 📢 Updates | |
| - **[2026/01/21]** 🎉 Released VulInstruct Specification Knowledge Base with 1,999 high-quality vulnerability-specification pairs! | |
| ## Dataset Structure | |
| Each example in the dataset includes the following features: | |
| - `cve_id`: The CVE identifier. | |
| - `cve_description`: Official description of the vulnerability. | |
| - `repository`: The source code repository. | |
| - `commit_hash`: The hash of the vulnerable commit. | |
| - `patch_commit_msg`: The commit message from the fix. | |
| - `specifications`: Extracted expectations about how the code should behave. | |
| - `vulnerability_analysis`: Root-cause reasoning for the flaw. | |
| - `solution_analysis`: Reasoning behind the fix. | |
| ## Citation | |
| If you use this dataset or the VulInstruct approach in your research, please cite: | |
| ```bibtex | |
| @article{zhu2025vulinstruct, | |
| title={VulInstruct: Teaching LLMs Root-Cause Reasoning for Vulnerability Detection via Security Specifications}, | |
| author={Hao Zhu and Jia Li and Cuiyun Gao and Jiaru Qian and Yihong Dong and Huanyu Liu and Lecheng Wang and Ziliang Wang and Xiaolong Hu and Ge Li}, | |
| journal={arXiv preprint arXiv:2511.04014}, | |
| year={2025} | |
| } | |
| ``` |