Datasets:

Modalities:
Text
Formats:
parquet
cedricbonhomme commited on
Commit
95f6673
·
verified ·
1 Parent(s): 1b88058

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -1
README.md CHANGED
@@ -43,7 +43,6 @@ Source Data
43
  The dataset comprises 15,836 vulnerabilities and **18,435 associated patches**. For training, we consider only those patches corresponding to vulnerabilities annotated with at least one CWE.
44
 
45
 
46
-
47
  The vulnerabilities are sourced from:
48
 
49
  - NVD CVE List — enriched with commit references
@@ -54,6 +53,30 @@ The vulnerabilities are sourced from:
54
 
55
  - CSAF feeds from vendors including Red Hat, Cisco, and CISA
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  ### Schema
58
 
59
  Each example contains:
 
43
  The dataset comprises 15,836 vulnerabilities and **18,435 associated patches**. For training, we consider only those patches corresponding to vulnerabilities annotated with at least one CWE.
44
 
45
 
 
46
  The vulnerabilities are sourced from:
47
 
48
  - NVD CVE List — enriched with commit references
 
53
 
54
  - CSAF feeds from vendors including Red Hat, Cisco, and CISA
55
 
56
+ ### How to use with datasets
57
+
58
+ ```python
59
+ >>> import json
60
+ >>> from datasets import load_dataset
61
+
62
+ >>> dataset = load_dataset("CIRCL/vulnerability-cwe-patch")
63
+
64
+ >>> vulnerabilities = ["CVE-2025-60249", "CVE-2025-32413"]
65
+
66
+ >>> filtered_entries = dataset.filter(lambda elem: elem["id"] in vulnerabilities)
67
+
68
+ >>> for entry in filtered_entries["train"]:
69
+ ... print(entry["cwe"])
70
+ ... for patch in entry["patches"]:
71
+ ... print(f" {patch['commit_message']})
72
+ ...
73
+ CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting')
74
+ [PATCH] fix: [security] Fixed a stored XSS vulnerability in user bios. Thanks to Dawid Czarnecki for reporting the issue.
75
+ CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting')
76
+ [PATCH] fix: [security] sanitize user input in comments, bundles, and sightings - Escaped untrusted data in templates and tables to prevent XSS - Replaced unsafe innerHTML assignments with createElement/textContent - Encoded dynamic URLs using encodeURIComponent - Improved validation in Comment, Bundle, and Sighting models Credit: @Wachizungu
77
+ ```
78
+
79
+
80
  ### Schema
81
 
82
  Each example contains: