ChamaraVishwajithRajapaksha commited on
Commit
65a5bc3
·
verified ·
1 Parent(s): 4b7f005

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +68 -35
README.md CHANGED
@@ -1,37 +1,70 @@
 
1
  ---
2
- dataset_info:
3
- features:
4
- - name: func
5
- dtype: string
6
- - name: target
7
- dtype: int64
8
- - name: cwe
9
- list: string
10
- - name: project
11
- dtype: string
12
- - name: commit_id
13
- dtype: string
14
- - name: hash
15
- dtype: float64
16
- - name: size
17
- dtype: int64
18
- - name: message
19
- dtype: string
20
- - name: is_vulnerable
21
- dtype: string
22
- - name: cwe_id_extracted
23
- dtype: string
24
- - name: cwe_details
25
- dtype: string
26
- splits:
27
- - name: train
28
- num_bytes: 817707249
29
- num_examples: 330492
30
- download_size: 313045683
31
- dataset_size: 817707249
32
- configs:
33
- - config_name: default
34
- data_files:
35
- - split: train
36
- path: data/train-*
37
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
  ---
3
+ license: mit
4
+ tags:
5
+ - security
6
+ - cwe
7
+ - vulnerability
8
+ - code-analysis
9
+ - software-security
10
+ - dataset
11
+ - machine-learning
12
+ - llm-finetuning
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  ---
14
+
15
+ # 🔐 Code Vulnerability Dataset (CWE-Enriched)
16
+
17
+ ## 📌 Overview
18
+
19
+ This dataset is built from the **bstee615/diversevul** dataset and enhanced with structured vulnerability intelligence from the **MITRE Common Weakness Enumeration (CWE)** database.
20
+
21
+ It provides a rich, machine-readable representation of software vulnerabilities, mapping raw vulnerable code samples to standardized CWE classifications.
22
+
23
+ The dataset is designed for research and development in:
24
+ - Vulnerability detection models
25
+ - Secure code generation
26
+ - LLM fine-tuning for cybersecurity tasks
27
+ - Static analysis and code understanding systems
28
+
29
+ ---
30
+
31
+ ## 🧠 Dataset Enrichment Process
32
+
33
+ Each sample in the dataset has been augmented using the MITRE CWE API to include structured security intelligence such as:
34
+
35
+ - CWE identifier (e.g., CWE-787)
36
+ - Vulnerability type (e.g., Out-of-bounds Write)
37
+ - Human-readable description
38
+ - Severity / exploit likelihood
39
+ - Impact categories (e.g., code execution, crash)
40
+ - Applicable programming languages
41
+ - Security classification metadata
42
+
43
+ ---
44
+
45
+ ## 📊 Data Structure
46
+
47
+ Each row in the dataset contains:
48
+
49
+ ### 🔹 Original Fields
50
+ - `func` → Source code snippet
51
+ - `cwe` → Original CWE labels from DiverseVul dataset
52
+
53
+ ### 🔹 Enriched Field
54
+ - `cwe_details` → JSON object containing structured CWE metadata:
55
+
56
+ ```json
57
+ {
58
+ "cwe_id": "CWE-787",
59
+ "vulnerability_type": "Out-of-bounds Write",
60
+ "description": "The product writes data past the end, or before the beginning, of the intended buffer.",
61
+ "severity": "High",
62
+ "category": "Memory Corruption",
63
+ "impact": [
64
+ "Modify Memory",
65
+ "Execute Unauthorized Code",
66
+ "Crash (DoS)"
67
+ ],
68
+ "languages": ["C", "C++"],
69
+ "example": "Example not extracted"
70
+ }