嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元微信扫码支付:2 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
open-source project for source code-level vulnerability detection based on the supervised machine learning technique. The project implementation is based on the paper: [Deep Learning-Based Vulnerable Function Detection: A Benchmark]
## Instructions & Usage
Unzip the zip file of this repository, one will see the following folders:
* The config folder -- containing the configuration file.
* The data folder -- containing the source code functions (vulnerable and non-vulnerable).
* The result folder -- containing the sample results.
* The src folder -- containing the code for model training and test.
And there are two Python script files:
* main.py -- for training and testing a specified network model. By specifying different options/parameters, users can apply different embedding methods and switch between training and testing mode.
* Obtain_representations.py -- for obtaining high-level representations from a trained network model.
| Options | Description |
|---------|-----------------------------------------------------------------------------------------------|
| config | Path to the configuration file. |
| seed | Random seed for reproduction of the results. |
| data_dir | The path of the code base for training. (can be obtained by download & unzip the files under data folder. By default, it is `data/`.) |
| logdir | Path to store training logs (log files for Tensorboard). By default, it is `logs/` |
| output_dir | The output path of the trained network model. By default, it is `result/models/<model_name.h5>` |
| trained_model | The path of the trained model for test. By default, the trained models are stored in `result/models/` |
| embedding | The embedding method for converting source code sequences to meaningful vector representations. Currently, we also support Word2vec, GloVe and FastText. By default, the Word2vec method is used. |
| test | Switch to the test mode. |
| verbose | Show all messages.