Auto-Patching: AI Vulnerability Remediation
A team pipeline that finds vulnerabilities in uploaded code, has a local LLM write the fix, and only accepts patches that pass in a sandbox. Anything doubtful goes to a human.
- FastAPI job API with language detection, a Streamlit upload page, and SAST scanning with Semgrep, Bandit, Flawfinder and cppcheck (Python and C).
- Fixes generated by Qwen2.5-Coder running locally through Ollama, so source code never leaves the machine.
- My seat: LoRA fine-tuning. Compared base models (Qwen2.5-Coder 3B / 7B, DeepSeek-Coder), costed GPU options and set up training on Kaggle (2× T4).
- Uploadfile in, language detected
- ScanSAST findings
- PatchLLM writes a diff
- Sandboxbuild + tests in Docker
- Decideaccepted or needs a human