AI-driven AppSec engine for automated vulnerability detection on Git commits.
Clone the repository and create a virtual environment:
git clone [https://github.com/foiovituh/patchlens.git](https://github.com/foiovituh/patchlens.git)
cd patchlens
python3 -m venv .venv
source .venv/bin/activateInstall the dependencies:
python -m pip install --upgrade pip
python -m pip install -e .python -m pip ensures that pip is executed using the currently active Python interpreter. You can also use pip directly if your environment is correctly configured.
To use PatchLens in a new terminal session, activate the virtual environment again:
source .venv/bin/activateInstall development dependencies:
python -m pip install -e ".[dev]"PatchLens uses OpenRouter to interact with AI models. You must set your API key as an environment variable before starting the application.
export OPENROUTER_API_KEY="sk-or-v1-..."Run the application:
python -m patchlensOpen your browser and navigate to http://127.0.0.1:5000. Paste a public GitHub commit URL to generate the security review.
Note: Response time in this initial MVP may be slow depending on the patch size and LLM latency.
Run the test suite:
pytestGenerate a coverage report:
pytest --cov=patchlens --cov-report=term-missingRun Ruff:
ruff check . --fix
ruff format .Note: PatchLens is currently in its early stages (v0.0.1) as a lean MVP. The immediate focus is core stability, code reliability, and developer experience before expanding to broader features.
- Web interface for Git patch submission
- Automatic GitHub patch extraction
- AI-powered vulnerability detection (OpenRouter)
- Internal bug hunting
- Expand test suite
- Extract hardcoded parameters (model selection, timeouts, max tokens)
- Security review prompt optimization
- Local database storage for review history
- Private repository support via personal access tokens
- Support for GitLab and Bitbucket
- Claude Code extension / MCP integration
- Export reports (JSON/PDF)
- Dedicated CLI interface
If you like this project or find it useful, please give it a star! It helps increase its visibility and supports future development.
Distributed under the MIT License. See LICENSE for more information.
