Thanks for your interest in AutoPentest Lite. This document covers everything you need to get started.
- Python 3.12+
- Node.js 18+
- Ollama with
llama3.1pulled - Security tools:
nmap gobuster sqlmap whatweb dirb nikto
git clone https://github.com/Giathi-Daniel/AutoPentest-Lite.git
cd AutoPentest-Lite
# Backend
cd backend
pip install -r requirements.txt
# Frontend
cd ../frontend
npm install# Terminal 1 — backend
cd backend && python main.py --serve --debug
# Terminal 2 — frontend
cd frontend && npm run dev# Backend unit tests
cd backend && pytest
# Frontend e2e tests
cd frontend && npm run test:e2eAll tests must pass before opening a pull request. CI runs both suites automatically.
- Create
backend/tools/<toolname>.pyfollowing the existing pattern:
from __future__ import annotations
from .executor import run_command
from .targets import to_host_target # or to_url_target
def run(target: str, goal: str, timeout: int = 120) -> dict[str, object]:
return run_command(
tool="mytool",
args=["mytool", "--flag", to_host_target(target)],
target=target,
goal=goal,
timeout=timeout,
)- Register it in
backend/tools/__init__.py:
from .mytool import run as run_mytool
_TOOLS: dict[str, ToolRunner] = {
...
"mytool": run_mytool,
}-
Add tests in
backend/tests/covering at least: success result, tool not found, timeout. -
Add the tool name to the relevant section in
README.md.
Edit _CTF_CHAINS in backend/main.py:
_CTF_CHAINS: dict[str, list[str]] = {
"web": ["gobuster", "whatweb", "sqlmap"],
"network": ["nmap", "dirb", "nikto"],
"custom": ["mytool", "anothertool"], # add here
}Then add the chain to the CHAINS constant in frontend/src/CtfMode.jsx.
Python
- Follow PEP 8
- Use
from __future__ import annotationsat the top of every module - Type-annotate all public functions
- Run
blackandisortbefore committing:pip install black isort black backend/ isort backend/
JavaScript / React
- Functional components only
- Keep components focused — one responsibility per file
- MUI
sxprop for styles, no inlinestyle={{}} - No
console.login committed code
- Fork the repo and create a branch:
git checkout -b feature/my-feature - Make your changes with tests
- Run the full test suite locally
- Open a PR against
mainwith a clear description of what changed and why - CI must be green before merge
- New tool wrappers (e.g.
nuclei,ffuf,wpscan) - Improved vulnerability detection patterns in
backend/tools/analyze.py - UI improvements and accessibility fixes
- Documentation and example improvements
- Bug fixes with regression tests
Open a GitHub Discussion or check FAQ.md first.