Comparing Machine Learning Algorithms for Python Source Code Vulnerability Detection
For training the model run Train-Model.py (mode can be changed for different vulnerabilities)
Pretrained BiLSTM models are present on Model-BiLSTM https://github.com/Tf-arch/Python-Source-Code-Vulnerability-Detection/tree/main/Model-BiLSTM
Pretrained other Models are present on Model-others https://github.com/Tf-arch/Python-Source-Code-Vulnerability-Detection/tree/main/Model-others
Pretrained word2vec models are present on word2vec_models https://github.com/Tf-arch/Python-Source-Code-Vulnerability-Detection/tree/main/wordtovec_models
For trying the models run the result files with specific vulnerability, e.g., xss-results.ipynb https://github.com/Tf-arch/Python-Source-Code-Vulnerability-Detection/blob/main/xss-results.ipynb
For training your own word2vec model follow the instructions here https://github.com/LauraWartschinski/VulnerabilityDetection