Datasets:

Modalities:
Tabular
Text
Formats:
parquet
ArXiv:
DOI:
Libraries:
Datasets
pandas
License:
elselse commited on
Commit
ac1d5de
·
verified ·
1 Parent(s): 5e9f6fb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +83 -50
README.md CHANGED
@@ -1,50 +1,83 @@
1
- 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.
2
-
3
- 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.
4
- Source Data
5
-
6
- The vulnerabilities are sourced from:
7
-
8
- NVD CVE List (v5 format) — enriched with commit references
9
-
10
- GitHub Security Advisories (GHSA)
11
-
12
- GitLab advisories
13
-
14
- CSAF feeds from vendors including Red Hat, Cisco, and CISA
15
-
16
- Schema
17
-
18
- Each example contains:
19
-
20
- id: Vulnerability identifier (e.g., CVE-2023-XXXX, GHSA-XXXX)
21
-
22
- title: Human-readable title of the vulnerability
23
-
24
- description: Detailed vulnerability description
25
-
26
- patches: List of patch records, each with:
27
-
28
- url: Verified patch URL (GitHub/GitLab)
29
-
30
- patch_text_b64: Base64-encoded unified diff
31
-
32
- commit_message: Associated commit message
33
-
34
- cwe: List of CWE identifiers and names
35
-
36
- Use Cases
37
-
38
- The dataset supports a range of security-focused machine learning tasks:
39
-
40
- Vulnerability classification
41
-
42
- CWE prediction from descriptions
43
-
44
- Patch generation from natural language
45
-
46
- Commit message understanding
47
-
48
- Associated Code
49
-
50
- The dataset is generated with the extraction pipeline from vulnerability-lookup/ML-Gateway, which includes logic for fetching, filtering, validating, and encoding patch data.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: id
5
+ dtype: string
6
+ - name: title
7
+ dtype: string
8
+ - name: description
9
+ dtype: string
10
+ - name: cpes
11
+ list: string
12
+ - name: cvss_v4_0
13
+ dtype: float64
14
+ - name: cvss_v3_1
15
+ dtype: float64
16
+ - name: cvss_v3_0
17
+ dtype: float64
18
+ - name: cvss_v2_0
19
+ dtype: float64
20
+ splits:
21
+ - name: train
22
+ num_bytes: 364407183.04846585
23
+ num_examples: 562497
24
+ - name: test
25
+ num_bytes: 40489902.95153417
26
+ num_examples: 62500
27
+ download_size: 159615679
28
+ dataset_size: 404897086.0
29
+ configs:
30
+ - config_name: default
31
+ data_files:
32
+ - split: train
33
+ path: data/train-*
34
+ - split: test
35
+ path: data/test-*
36
+ task_categories:
37
+ - text-classification
38
+ license: cc-by-4.0
39
+ library_name: datasets
40
+ tags:
41
+ - vulnerability
42
+ - cybersecurity
43
+ - security
44
+ - cve
45
+ - cvss
46
+ ---
47
+
48
+ This dataset, `CIRCL/vulnerability-scores`, comprises over 600,000 real-world vulnerabilities used to train and evaluate VLAI, a transformer-based model designed to predict software vulnerability severity levels directly from text descriptions, enabling faster and more consistent triage.
49
+
50
+ The dataset is presented in the paper [VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification](https://huggingface.co/papers/2507.03607).
51
+
52
+ Project page: [https://vulnerability.circl.lu](https://vulnerability.circl.lu)
53
+ Associated code: [https://github.com/vulnerability-lookup/ML-Gateway](https://github.com/vulnerability-lookup/ML-Gateway)
54
+
55
+ ### Sources of the data
56
+
57
+
58
+ - CVE Program (enriched with data from vulnrichment and Fraunhofer FKIE)
59
+ - GitHub Security Advisories
60
+ - PySec advisories
61
+ - CSAF Red Hat
62
+ - CSAF Cisco
63
+ - CSAF CISA
64
+
65
+
66
+ Extracted from the database of [Vulnerability-Lookup](https://vulnerability.circl.lu).
67
+ Dumps of the data are available [here](https://vulnerability.circl.lu/dumps/).
68
+
69
+ ### Query with datasets
70
+
71
+ ```python
72
+ import json
73
+ from datasets import load_dataset
74
+
75
+ dataset = load_dataset("CIRCL/vulnerability-scores")
76
+
77
+ vulnerabilities = ["CVE-2012-2339", "RHSA-2023:5964", "GHSA-7chm-34j8-4f22", "PYSEC-2024-225"]
78
+
79
+ filtered_entries = dataset.filter(lambda elem: elem["id"] in vulnerabilities)
80
+
81
+ for entry in filtered_entries["train"]:
82
+ print(json.dumps(entry, indent=4))
83
+ ```