Update readme.md
Browse files
README.md
CHANGED
@@ -1,3 +1,45 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
4 |
+
|
5 |
+
|
6 |
+
# CodeXGLUE -- Defect Detection
|
7 |
+
|
8 |
+
## Task Definition
|
9 |
+
|
10 |
+
Given a source code, the task is to identify whether it is an insecure code that may attack software systems, such as resource leaks, use-after-free vulnerabilities and DoS attack. We treat the task as binary classification (0/1), where 1 stands for insecure code and 0 for secure code.
|
11 |
+
|
12 |
+
### Dataset
|
13 |
+
|
14 |
+
The dataset we use comes from the paper [*Devign*: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networks](http://papers.nips.cc/paper/9209-devign-effective-vulnerability-identification-by-learning-comprehensive-program-semantics-via-graph-neural-networks.pdf). We combine all projects and split 80%/10%/10% for training/dev/test.
|
15 |
+
|
16 |
+
|
17 |
+
### Data Format
|
18 |
+
|
19 |
+
Three pre-processed .jsonl files, i.e. train.jsonl, valid.jsonl, test.jsonl are present
|
20 |
+
|
21 |
+
For each file, each line in the uncompressed file represents one function. One row is illustrated below.
|
22 |
+
|
23 |
+
- **func:** the source code
|
24 |
+
- **target:** 0 or 1 (vulnerability or not)
|
25 |
+
- **idx:** the index of example
|
26 |
+
|
27 |
+
### Data Statistics
|
28 |
+
|
29 |
+
Data statistics of the dataset are shown in the below table:
|
30 |
+
|
31 |
+
| | #Examples |
|
32 |
+
| ----- | :-------: |
|
33 |
+
| Train | 21,854 |
|
34 |
+
| Dev | 2,732 |
|
35 |
+
| Test | 2,732 |
|
36 |
+
|
37 |
+
|
38 |
+
## Reference
|
39 |
+
<pre><code>@inproceedings{zhou2019devign,
|
40 |
+
title={Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks},
|
41 |
+
author={Zhou, Yaqin and Liu, Shangqing and Siow, Jingkai and Du, Xiaoning and Liu, Yang},
|
42 |
+
booktitle={Advances in Neural Information Processing Systems},
|
43 |
+
pages={10197--10207},
|
44 |
+
year={2019}
|
45 |
+
}</code></pre>
|