Datasets:

Modalities:
Text
Formats:
parquet
Size:
< 1K
Libraries:
Datasets
pandas
File size: 2,652 Bytes
02643f5
 
 
 
baf2c90
02643f5
baf2c90
6e82689
3adb331
 
 
793e569
 
3adb331
 
793e569
3adb331
02643f5
baf2c90
 
 
 
 
 
 
 
3adb331
02643f5
 
b72e8bf
 
 
 
02643f5
 
 
 
 
 
727b6fb
 
 
 
 
 
 
33715f1
727b6fb
 
 
 
 
 
 
 
 
 
 
33715f1
727b6fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33715f1
727b6fb
fc4b4a5
727b6fb
fc4b4a5
727b6fb
fc4b4a5
727b6fb
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: title
    dtype: string
  - name: description
    struct:
    - name: cweId
      dtype: string
    - name: description
      dtype: string
    - name: lang
      dtype: string
    - name: type
      dtype: string
  - name: patches
    list:
    - name: url
      dtype: string
    - name: patch_text_b64
      dtype: string
    - name: commit_message
      dtype: string
  - name: cwe
    sequence: string
  splits:
  - name: train
    num_bytes: 144478906
    num_examples: 800
  download_size: 95811988
  dataset_size: 144478906
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---

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.

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.
Source Data

The vulnerabilities are sourced from:

    - NVD CVE List — enriched with commit references

    - GitHub Security Advisories (GHSA)

    - GitLab advisories

    - CSAF feeds from vendors including Red Hat, Cisco, and CISA

### Schema

Each example contains:

    - id: Vulnerability identifier (e.g., CVE-2023-XXXX, GHSA-XXXX)

    - title: Human-readable title of the vulnerability

    - description: Detailed vulnerability description

    - patches: List of patch records, each with:

        url: Verified patch URL (GitHub/GitLab)

        patch_text_b64: Base64-encoded unified diff

        commit_message: Associated commit message

    - cwe: List of CWE identifiers and names

### Use Cases

The dataset supports a range of security-focused machine learning tasks:

    * Vulnerability classification
    
    * CWE prediction from descriptions
    
    * Patch generation from natural language
    
    * Commit message understanding

### Associated Code

The dataset is generated with the extraction pipeline from vulnerability-lookup/ML-Gateway, which includes logic for fetching, filtering, validating, and encoding patch data.