S1N6H/pentest-harness
pentest-harness is an open-source, plugin-based AI agent framework aimed at authorized penetration tests, bug bounty research, security labs, and CTFs. It provides a "Pentest Mode" offensive-security operating standard, a full agent toolset (shell, filesystem, web research, subagents, background jobs), and a bring-your-own-key multi-provider LLM engine (OpenAI, Anthropic, DeepSeek, Google, Mistral, Groq, OpenRouter, Azure OpenAI) with durable JSONL/SQLite session persistence and an owner-only credential store for API keys.
What it is
pentest-harness (S1N6H/pentest-harness, MIT license, product tagline "Heaven for Hackers") is a local Web UI for running an LLM agent during authorized pentests, bug bounty work, labs and CTFs. It is built on the Cordis plugin framework. Model adapters, tools, sessions, settings and credentials are each replaceable through configuration.
Beyond the catalog summary, the page lists context management (token metering, automatic compaction, tool-result pruning), provider cards with live connection testing and per-model context badges, and a dark-only theme. It also supports any custom OpenAI-compatible gateway with model auto-discovery.
Preconditions
- Node.js 20 or later (Node 22 recommended).
- pnpm, installed with
npm i -g pnpm. - An API key for at least one supported provider or compatible gateway.
What to do
Install and start the UI:
git clone https://github.com/S1N6H/pentest-harness.git
cd pentest-harness
pnpm install
pnpm build
pnpm dsh webThe UI opens at http://127.0.0.1:2323, so it binds to localhost by default. To change the port, run pnpm dsh web --port 3000. If pnpm dsh is not on PATH, use pnpm exec dsh web or node apps/cli/lib/index.js web.
To add a model provider:
- Open Settings → Models.
- Click Add a custom provider, or edit an existing one.
- Paste the API base URL. The provider ID and display name auto-fill.
- Enter the API key. The page says it goes to a local credential store and never to settings files or logs.
- Click a discovered model to add it, or add one by hand.
- Pick the model in the composer.
Caveats
The page gives no release or version number, no description of what Pentest Mode actually enforces, and no scope or authorization controls. Its security claims (owner-only credential store, keys kept out of logs) are the project's own statements, not independently verified. Shell and background-job tools are part of the toolset, so run it in an isolated environment, not on a host holding other credentials.
Related in Offensive Security