add instructions to README

#2
by arag0rn - opened
Files changed (1) hide show
  1. README.md +205 -58
README.md CHANGED
@@ -1,58 +1,205 @@
1
- ---
2
- license: mit
3
- dataset_info:
4
- features:
5
- - name: idx
6
- dtype: int64
7
- - name: project
8
- dtype: string
9
- - name: filepath
10
- dtype: string
11
- - name: commit_id
12
- dtype: string
13
- - name: commit_message
14
- dtype: string
15
- - name: is_vulnerable
16
- dtype: bool
17
- - name: hash
18
- dtype: string
19
- - name: func_name
20
- dtype: string
21
- - name: func_body
22
- dtype: string
23
- - name: changed_lines
24
- dtype: string
25
- - name: changed_statements
26
- dtype: string
27
- - name: cve_list
28
- sequence: string
29
- - name: cwe_list
30
- sequence: string
31
- - name: fixed_func_idx
32
- dtype: int64
33
- - name: context
34
- struct:
35
- - name: Execution Environment
36
- sequence: string
37
- - name: Explanation
38
- sequence: string
39
- - name: External Function
40
- sequence: string
41
- - name: Function Argument
42
- sequence: string
43
- - name: Globals
44
- sequence: string
45
- - name: Type Execution Declaration
46
- sequence: string
47
- splits:
48
- - name: train
49
- num_bytes: 118488441
50
- num_examples: 25440
51
- download_size: 30847988
52
- dataset_size: 118488441
53
- configs:
54
- - config_name: default
55
- data_files:
56
- - split: train
57
- path: data/train-*
58
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ dataset_info:
4
+ features:
5
+ - name: idx
6
+ dtype: int64
7
+ - name: project
8
+ dtype: string
9
+ - name: filepath
10
+ dtype: string
11
+ - name: commit_id
12
+ dtype: string
13
+ - name: commit_message
14
+ dtype: string
15
+ - name: is_vulnerable
16
+ dtype: bool
17
+ - name: hash
18
+ dtype: string
19
+ - name: func_name
20
+ dtype: string
21
+ - name: func_body
22
+ dtype: string
23
+ - name: changed_lines
24
+ dtype: string
25
+ - name: changed_statements
26
+ dtype: string
27
+ - name: cve_list
28
+ sequence: string
29
+ - name: cwe_list
30
+ sequence: string
31
+ - name: fixed_func_idx
32
+ dtype: int64
33
+ - name: context
34
+ struct:
35
+ - name: Execution Environment
36
+ sequence: string
37
+ - name: Explanation
38
+ sequence: string
39
+ - name: External Function
40
+ sequence: string
41
+ - name: Function Argument
42
+ sequence: string
43
+ - name: Globals
44
+ sequence: string
45
+ - name: Type Execution Declaration
46
+ sequence: string
47
+ splits:
48
+ - name: train
49
+ num_bytes: 118488441
50
+ num_examples: 25440
51
+ download_size: 30847988
52
+ dataset_size: 118488441
53
+ configs:
54
+ - config_name: default
55
+ data_files:
56
+ - split: train
57
+ path: data/train-*
58
+ ---
59
+
60
+ # Dataset Card for Dataset Name
61
+
62
+ SecVulEval is a collection of real-world C/C++ vulnerabilities.
63
+
64
+ ## Dataset Details
65
+
66
+ ### Dataset Description
67
+ The dataset is curated by collecting C/C++ vulnerability from NVD. It features statement-level vulnerable information, context information for vulnerable functions
68
+ (`is_vulnerable=True`), and other metadata such as CVE, CWE, commit information. The dataset contains vulnerable and non-vulnerable function samples.
69
+
70
+ <!-- - **Curated by:** [More Information Needed]
71
+ - **Funded by [optional]:** [More Information Needed]
72
+ - **Shared by [optional]:** [More Information Needed]
73
+ - **Language(s) (NLP):** [More Information Needed]
74
+ - **License:** [More Information Needed] -->
75
+
76
+ ### Dataset Sources
77
+
78
+ The vulnerabilities (CVEs) are collected from NVD (https://nvd.nist.gov). Then, the corresponding patches to the vulnerabilities are collected from their
79
+ respective git repositories.
80
+
81
+ <!-- - **Repository:** [More Information Needed]
82
+ - **Paper [optional]:** [More Information Needed]
83
+ - **Demo [optional]:** [More Information Needed] -->
84
+
85
+ ## Uses
86
+
87
+ The dataset comprises both vulnerable (43.23%) and non-vulnerable (56.77%) functions, with a total collection of 25,440 function. This large collection of functions make
88
+ it suitable for training vulnerability detection model. The statement-level info, along with contextual information can make context-aware detection at finer-grained
89
+ level possible. The dataset can also be used to evaluate C/C++ vulnerability detection models.
90
+
91
+ <!-- ### Direct Use
92
+
93
+ <!-- This section describes suitable use cases for the dataset. -->
94
+
95
+ <!-- [More Information Needed] -->
96
+
97
+ <!-- ### Out-of-Scope Use
98
+
99
+ <!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
100
+
101
+ <!-- [More Information Needed] -->
102
+
103
+ ## Dataset Structure
104
+
105
+ The dataset has 15 different fields.
106
+ - The `changed_lines` and `changed_statements` columns include the changes in made in the patch as a list of (line, code) pair.
107
+ Vulnerable functions include the deleted lines/statements and the non-vulnerable functions has the added lines/statements.
108
+ - Some functions/vulnerabilities can be assigned to more than one CVE/CWE which is why `cve_list` and `cwe_list` are given as lists, although in most cases there would be
109
+ only one CVE and CWE id.
110
+ - The `fixed_func_id` includes the `idx` number (first field in the dataset) of the corresponding fixed patch of a vulnerable function. This helps to easily pair the
111
+ vulnerable functions with their fixing code. For non-vulnerable code it doesn't make sense for a "fixed" version and the `fixed_func_id` is just itself.
112
+ - The `context` field includes contextual information for vulnerable functions according to the five categories as discussed in the paper. It is added as the list of
113
+ symbols and an explanation as generated by the LLM.
114
+
115
+ Other fields are self-explanatory.
116
+
117
+ <!-- [More Information Needed]
118
+
119
+ ## Dataset Creation
120
+
121
+ ### Curation Rationale
122
+
123
+ <!-- Motivation for the creation of this dataset. -->
124
+
125
+ <!-- [More Information Needed] -->
126
+
127
+ <!-- ### Source Data -->
128
+
129
+ <!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
130
+
131
+ <!-- #### Data Collection and Processing -->
132
+
133
+ <!-- This section describes the data collection and processing process such as data selection criteria, filtering and normalization methods, tools and libraries used, etc. -->
134
+
135
+ <!-- [More Information Needed] -->
136
+
137
+ <!-- #### Who are the source data producers? -->
138
+
139
+ <!-- This section describes the people or systems who originally created the data. It should also include self-reported demographic or identity information for the source data creators if this information is available. -->
140
+
141
+ <!-- [More Information Needed] -->
142
+
143
+ <!-- ### Annotations [optional]
144
+
145
+ <!-- If the dataset contains annotations which are not part of the initial data collection, use this section to describe them. -->
146
+
147
+ <!-- #### Annotation process -->
148
+
149
+ <!-- This section describes the annotation process such as annotation tools used in the process, the amount of data annotated, annotation guidelines provided to the annotators, interannotator statistics, annotation validation, etc. -->
150
+
151
+ <!-- [More Information Needed] -->
152
+
153
+ <!-- #### Who are the annotators?
154
+
155
+ <!-- This section describes the people or systems who created the annotations. -->
156
+
157
+ <!-- [More Information Needed] -->
158
+
159
+ <!-- #### Personal and Sensitive Information
160
+
161
+ <!-- State whether the dataset contains data that might be considered personal, sensitive, or private (e.g., data that reveals addresses, uniquely identifiable names or aliases, racial or ethnic origins, sexual orientations, religious beliefs, political opinions, financial or health data, etc.). If efforts were made to anonymize the data, describe the anonymization process. -->
162
+
163
+ <!-- [More Information Needed] -->
164
+
165
+ <!-- ## Bias, Risks, and Limitations -->
166
+
167
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
168
+
169
+ <!-- [More Information Needed] -->
170
+
171
+ <!-- ### Recommendations -->
172
+
173
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
174
+
175
+ <!-- Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations. -->
176
+
177
+ <!-- ## Citation [optional] -->
178
+
179
+ <!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
180
+
181
+ <!-- **BibTeX:**
182
+
183
+ [More Information Needed]
184
+
185
+ **APA:**
186
+
187
+ [More Information Needed] -->
188
+
189
+ <!-- ## Glossary [optional] -->
190
+
191
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
192
+
193
+ <!-- [More Information Needed]
194
+
195
+ ## More Information [optional]
196
+
197
+ [More Information Needed] -->
198
+
199
+ <!-- ## Dataset Card Authors [optional]
200
+
201
+ [More Information Needed]
202
+
203
+ ## Dataset Card Contact
204
+
205
+ [More Information Needed] -->