Skip to content

A custom-trained StarEncoder LLM packaged into an easy-to-use CLI that curates vulnerable source code from GitHub.

Notifications You must be signed in to change notification settings

neuralsentry/vulnfix-commit-llm-classifier

Repository files navigation

NeuralSentry Logo

vulnfix-commit-llm-classifier

vulnfix-commit-llm-classifier is a tool that clones remote Git repositories, extracts commit information, and classifies commits using NeuralSentry's vulnerability-fix commit (VFC) classification model. Demo Gif

Installation

# Python 3.11+ and pip is required!
# Optional (venv)
python3 -m venv venv
source venv/bin/activate

# Install Pytorch
# See: https://pytorch.org/get-started/locally/
# For systems with NVIDIA GPUs:
pip3 install torch --index-url https://download.pytorch.org/whl/cu118

# For systems without NVIDIA GPUs:
pip3 install torch --index-url https://download.pytorch.org/whl/cpu

# Install dependencies
pip install -r requirements.txt

Usage

Built-in Help

python main.py --help

Examples

Windows

python main.py `
  -i data/examples.txt `
  --output data/output.csv `
  --bugfix-threshold 0.95 `
  --batch-size 32 `
  --after "2023-01-01"

Linux

python main.py \
  -i data/examples.txt \
  --output data/output.csv \
  --bugfix-threshold 0.95 \
  --batch-size 32 \
  --after "2023-01-01"

About

A custom-trained StarEncoder LLM packaged into an easy-to-use CLI that curates vulnerable source code from GitHub.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published