PwnCortex organizes an engagement around the actual pentest workflow: assets → findings → evidence → report.
- You import scanner output, and each result becomes a candidate in a triage queue.
- Accepted candidates become findings, with server-side CVSS, affected assets and screenshot evidence.
- The report comes out as a PDF from an HTML/CSS template you can edit, SysReptor-style.
It runs locally in Docker, behind an operator password, with no telemetry. With PWNCORTEX_OFFLINE=1, no request leaves the machine.
The interface and the built-in report template are in Portuguese (pt-BR); reports can also be generated in English.
- Importers: Nmap XML, Nessus (
.nessus), Nuclei JSONL, Burp (issues XML), OpenVAS/Greenbone XML, masscan JSON, generic CSV and PwnCortex's own JSON. The format is detected from the content. All XML goes throughdefusedxml.- Re-importing the same file is idempotent.
- Every import can be undone. Data another import also saw stays: undo removes only what came from that file alone.
.txtand.mdfiles become notes.
- Triage: scanner results never become findings directly. You accept, merge into an existing finding, defer or discard.
- Shortcuts:
J/Kmove,Aaccepts,Mmerges,Ldefers,Xdiscards. - PwnCortex suggests the closest library template for each candidate.
- A discarded candidate does not come back on the next scan.
- The AI can point out duplicates across tools.
- Shortcuts:
- Findings:
- CVSS 3.1 and 4.0 editor: each segment of the vector is clickable and the score is recalculated as you go.
- Severity can be overridden by hand, with a justification.
- Each finding also holds affected assets (with port), CWE, CVEs, references, and writing and remediation status for the retest.
- Text is Markdown. Pasting or dropping a screenshot uploads it as a project attachment.
- Library: 25 finding templates in Portuguese (AD, web, network, crypto) to create findings in one click. Export and import as JSON.
- PDF report:
- HTML/CSS templates with Jinja (sandboxed), rendered by WeasyPrint. The PDF has a cover, table of contents, severity chart, one finding per page, and ports and checklist appendices.
- A live preview sits next to the text, showing the first 10 findings to stay fast; the generated PDF includes all of them. Every generation is kept as a version.
- Templates cannot reach the network or the disk: only the project's attachments and the template's own images.
- Assets: a virtualized table, or a graph grouped by /24 subnet or by domain and colored by the highest open severity. The detail view shows services, CPE, NSE output and linked findings.
- Enrichment: NVD CVEs from service versions (cached and rate limited), CISA KEV flags and EPSS. All disabled in offline mode. The KEV catalog can also be imported from a file.
- AI assistant: local Ollama or OpenRouter, in a side drawer opened with
Ctrl+Jthat takes the open finding or asset as context. The AI suggests; nothing is saved until you apply it. It helps with:- drafting a finding;
- recommendations;
- pt-BR/en translation;
- the executive summary;
- analysis of an asset.
- Checklist: 125 items (OWASP WSTG, network, AD, infrastructure) with
1–4shortcuts and links to findings. - Keyboard navigation:
Ctrl+Kopens the command palette (findings, assets, notes, actions).Ncreates a new finding.g a,g f,g t,g rgo to assets, findings, triage and report.
Project overview. Open findings by severity, next steps, and imports, each one undoable.
Triage. A scanner result arrives with a suggested library template; A accepts it and creates the finding with its assets and tool output.
Finding editor. The CVSS vector is edited segment by segment; score and severity are recalculated on the server.
PDF report. Cover, executive summary with counts by severity, and one finding per page with its evidence.
![]() |
![]() |
| Assets grouped by subnet, colored by the highest open severity. | Asset detail: services, CPE, NSE output and linked findings. |
Requirements: Docker with the Compose plugin.
git clone https://github.com/brennocm/pwncortex.git
cd pwncortex
cp .env.example .env # adjust if needed
./start.sh # choose local Ollama or OpenRouterThe interface is at http://127.0.0.1:8080. The API and Ollama are only reachable inside the Compose network.
First access. The API prints a setup token to its log. Run docker compose logs api, copy the token and set the password on the setup screen. To skip this step, set PWNCORTEX_ADMIN_PASSWORD in .env before the first boot.
Databases from earlier versions are migrated automatically on startup (Alembic).
- Old vulnerabilities become draft findings.
- The old report draft becomes a note.
- Back up the
pwncortex-dbvolume before upgrading.
| Variable | Default | Purpose |
|---|---|---|
PWNCORTEX_BIND / PWNCORTEX_PORT |
127.0.0.1 / 8080 |
Where the interface listens. For remote access, put it behind TLS and set PWNCORTEX_SECURE_COOKIES=1. |
PWNCORTEX_ADMIN_PASSWORD |
empty | Operator password on first boot. |
PWNCORTEX_OFFLINE |
0 |
1 blocks OpenRouter, NVD, KEV and EPSS. |
LLM_PROVIDER |
ollama |
ollama or openrouter (also configurable in the interface). |
OLLAMA_MODEL |
qwen2.5:3b |
Local model. |
OPENROUTER_API_KEY / OPENROUTER_MODEL |
empty | Stored encrypted in the database when set from the interface. |
NVD_API_KEY |
empty | Raises the NVD limit from 5 to 50 requests per 30 s. |
PWNCORTEX_MAX_UPLOAD_MB |
200 |
Maximum size of a scan file. |
PWNCORTEX_LLM_TIMEOUT |
120 |
Maximum LLM response time, in seconds. |
uv venv .venv && uv pip install -p .venv -r src/server/requirements-dev.txt
(cd src/web && npm ci)
# API with reload (port 8000) and Vite (port 5173, proxying /api)
PWNCORTEX_DATA_DIR=./data PWNCORTEX_UPLOADS_DIR=./uploads .venv/bin/uvicorn src.server.main:app --reload
(cd src/web && npm run dev)
# Or everything in containers with hot reload
docker compose -f docker-compose.yml -f docker-compose.dev.yml up
# Lint, tests and build
bin/ci| Layer | Technology |
|---|---|
| API | Python 3.12, FastAPI, SQLAlchemy 2 + SQLite (WAL, FKs), Alembic |
| Security | argon2id password, HttpOnly/SameSite=Strict session cookie, X-PwnCortex anti-CSRF header, Fernet-encrypted secrets |
| Jobs | In-process thread pool; status in the jobs table (imports, PDF, NVD, KEV, EPSS) |
| Report | Markdown (markdown-it + nh3), sandboxed Jinja2, WeasyPrint with a restricted fetcher |
| Web | React 18, Vite, Tailwind, TanStack Query, React Router 7, CodeMirror 6, Cytoscape + fcose |
| Proxy | Nginx: /api to the API, everything else to the static build, with CSP and security headers |
Measured on a synthetic project with 500 hosts, 300 findings and 200 candidates:
- lists respond in under 200 ms;
- a 1,000-host Nmap scan imports in about 6 s;
- the full PDF (about 430 pages) takes around 35 s, in a background job.
Code lives in src/data (models and migrations), src/domain (importers, findings, report, AI, enrichment), src/server (routes) and src/web (interface). Tests are in tests/.
- I don't know the password / lost the token. The token appears in
docker compose logs apiwhile no password is set. With a password set, delete theadmin_password_hashkey from theapp_settingstable and restart the API to get a new token. - The assistant does not answer. Check Settings → Test connection. With Ollama, the model must be pulled:
docker compose exec ollama ollama pull qwen2.5:3b. 404 No endpoints availableon OpenRouter. Relax the data policy atopenrouter.ai/settings/privacy.- NVD refuses requests. Without a key the limit is 5 requests per 30 s. Set
NVD_API_KEYor wait: the cache lasts 7 days.
PwnCortex is intended only for authorized security testing. Using it against systems without explicit written permission is illegal. The authors are not responsible for misuse.
AGPL-3.0. See LICENSE.





