Update README.md
Browse files
README.md
CHANGED
|
@@ -19,13 +19,64 @@ dataset_info:
|
|
| 19 |
dtype: string
|
| 20 |
splits:
|
| 21 |
- name: train
|
| 22 |
-
num_bytes:
|
| 23 |
-
num_examples:
|
| 24 |
-
download_size:
|
| 25 |
-
dataset_size:
|
| 26 |
configs:
|
| 27 |
- config_name: default
|
| 28 |
data_files:
|
| 29 |
- split: train
|
| 30 |
path: data/train-*
|
| 31 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
dtype: string
|
| 20 |
splits:
|
| 21 |
- name: train
|
| 22 |
+
num_bytes: 147284033
|
| 23 |
+
num_examples: 883
|
| 24 |
+
download_size: 97380398
|
| 25 |
+
dataset_size: 147284033
|
| 26 |
configs:
|
| 27 |
- config_name: default
|
| 28 |
data_files:
|
| 29 |
- split: train
|
| 30 |
path: data/train-*
|
| 31 |
---
|
| 32 |
+
|
| 33 |
+
This dataset, CIRCL/vulnerability-cwe-patch, provides structured real-world vulnerabilities enriched with CWE identifiers and actual patches from platforms like GitHub and GitLab. It was built to support the development of tools for vulnerability classification, triage, and automated repair. Each entry includes metadata such as CVE/GHSA ID, a description, CWE categorization, and links to verified patch commits with associated diff content and commit messages.
|
| 34 |
+
|
| 35 |
+
The dataset is automatically extracted using a robust pipeline that fetches vulnerability records from several sources, filters out entries without patches, and verifies patch links for accessibility. Extracted patches are fetched, encoded in base64, and stored alongside commit messages for training and evaluation of ML models.
|
| 36 |
+
Source Data
|
| 37 |
+
|
| 38 |
+
The vulnerabilities are sourced from:
|
| 39 |
+
|
| 40 |
+
- NVD CVE List — enriched with commit references
|
| 41 |
+
|
| 42 |
+
- GitHub Security Advisories (GHSA)
|
| 43 |
+
|
| 44 |
+
- GitLab advisories
|
| 45 |
+
|
| 46 |
+
- CSAF feeds from vendors including Red Hat, Cisco, and CISA
|
| 47 |
+
|
| 48 |
+
### Schema
|
| 49 |
+
|
| 50 |
+
Each example contains:
|
| 51 |
+
|
| 52 |
+
- id: Vulnerability identifier (e.g., CVE-2023-XXXX, GHSA-XXXX)
|
| 53 |
+
|
| 54 |
+
- title: Human-readable title of the vulnerability
|
| 55 |
+
|
| 56 |
+
- description: Detailed vulnerability description
|
| 57 |
+
|
| 58 |
+
- patches: List of patch records, each with:
|
| 59 |
+
|
| 60 |
+
url: Verified patch URL (GitHub/GitLab)
|
| 61 |
+
|
| 62 |
+
patch_text_b64: Base64-encoded unified diff
|
| 63 |
+
|
| 64 |
+
commit_message: Associated commit message
|
| 65 |
+
|
| 66 |
+
- cwe: List of CWE identifiers and names
|
| 67 |
+
|
| 68 |
+
### Use Cases
|
| 69 |
+
|
| 70 |
+
The dataset supports a range of security-focused machine learning tasks:
|
| 71 |
+
|
| 72 |
+
* Vulnerability classification
|
| 73 |
+
|
| 74 |
+
* CWE prediction from descriptions
|
| 75 |
+
|
| 76 |
+
* Patch generation from natural language
|
| 77 |
+
|
| 78 |
+
* Commit message understanding
|
| 79 |
+
|
| 80 |
+
### Associated Code
|
| 81 |
+
|
| 82 |
+
The dataset is generated with the extraction pipeline from vulnerability-lookup/ML-Gateway, which includes logic for fetching, filtering, validating, and encoding patch data.
|