072GPT
by omk4r72
README.md
# 072GPT
**An autonomous security-research agent for your terminal.**
`072gpt` is a local CLI agent in the shape of codex: one command installs it,
you point it at a host you own, and it profiles the target, picks the engines
worth running, verifies what it finds, and refuses to write a report it cannot
back with evidence.
```
___ ____ ____ ____ ____ _____
/ _ \|___ \| ___| / ___| _ \_ _|
| | | | __) |___ \| | _| |_) || |
| |_| |/ __/ ___) | |_| | __/ | |
\___/|_____|____/ \____|_| |_|
072gpt scope example.com · custom/claude-sonnet-4-6 · session 7aa58ec8cb95
╭──────────────────────────────────────────────────────────────╮
│ hunt example.com, focus on idor and auth │
│ I'll profile the surface first, then pick engines. │
╰──────────────────────────────────────────────────────────────╯
→ scope_check(target=example.com)
│ {"target": "example.com", "authorized": true, ...}
→ surface(target=example.com)
│ {"surface": {"server": "nginx", "framework": "express"}, ...}
```
MIT. Bring your own model key. Nothing phones home.
---
## Install
```bash
curl -fsSL https://raw.githubusercontent.com/omk4r72/072gpt-mcp/main/install.sh | bash
```
Or by hand:
```bash
git clone https://github.com/omk4r72/072gpt-mcp.git
cd 072gpt-mcp
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
```
Either way you get a `072gpt` command on your PATH. Python 3.10+.
## Configure
```bash
072gpt login
```
```
current: openai / gpt-4o-mini
providers: anthropic, custom, deepseek, groq, ollama, openai, openrouter
provider [openai]:
model [gpt-4o-mini]:
base_url [https://api.openai.com/v1]:
api key [enter to keep]:
```
Or set it from the environment, which always wins over the file:
```bash
export OPENAI_API_KEY=sk-... # or ANTHROPIC_API_KEY, OPENROUTER_API_KEY, ...
export DR_OWNED_DOMAINS=example.com # what you are allowed to hunt
```
Check it without spending a token:
```bash
072gpt doctor
```
```
version 1.0.0
config /home/you/.072gpt/config.json
provider openai
model gpt-4o-mini
base_url https://api.openai.com/v1
api_key set from $OPENAI_API_KEY
scope example.com
sessions 2 recent
engines {'total_engines': 121, 'callable': 103, ...}
OK
```
## Commands
| | |
|---|---|
| `072gpt` | interactive session (full-screen TUI) |
| `072gpt "hunt example.com"` | one instruction, then exit |
| `072gpt exec "..."` | non-interactive, scriptable |
| `072gpt exec --json "..."` | one JSON object of events, for machines |
| `072gpt resume [ID]` | continue a saved session |
| `072gpt fork [ID]` | branch a saved session |
| `072gpt review --diff HEAD~1` | audit a diff for security bugs |
| `072gpt queue add "..."` / `queue run` | line up instructions, drain them in order |
| `072gpt archive [ID]` | move a session out of the resume picker |
| `072gpt delete [ID]` | remove a session for good (`--force` to skip the prompt) |
| `072gpt sandbox [HOST]` | show the guard, or test one host against it |
| `072gpt features` | what this build can actually do, probed not claimed |
| `072gpt login` / `logout` | configure or remove credentials |
| `072gpt mcp` | run the MCP server on stdio |
| `072gpt doctor` | config, scope, engine census |
| `072gpt scope` | what am I allowed to hunt |
| `072gpt completion bash` | completion for bash, zsh or fish |
Flags that work everywhere: `-p/--provider`, `-m/--model`, `-y/--yes`.
## Inside the session
The TUI is a status bar, a scrolling transcript and a composer. Tool calls
appear as they run, not after the fact.
| Key / command | |
|---|---|
| `/help` | list commands |
| `/scope` | authorized targets |
| `/engines` | the engine catalogue |
| `/model` | change provider/model |
| `/sessions` | saved sessions, newest first |
| `/save`, `/new`, `/clear` | session control |
| `↑` / `↓` | walk the input history |
| `ctrl+l` | clear the transcript |
| `ctrl+c` / `ctrl+d` | interrupt, then quit |
Anything that would touch a network target first asks for approval. `y` allows,
`n` or `esc` denies, and a denial is reported to the model as `DENIED` so it
does not retry it. `--yes` skips the prompt; use it only when you mean it.
## Scope comes first — and it is enforced in code
This is a scanner. Pointing it at a host you do not own or have permission to
test is illegal in most places and will get you banned from programs. So scope
is not a suggestion in the system prompt; it is a check inside every tool:
- **Nothing is authorized by default.** `DR_OWNED_DOMAINS` is empty on a fresh
install, which means every target is refused.
- `hunt`, `run_engine`, `surface` and `verify` all call the guard **before** a
request leaves your machine.
- If the guard cannot load, the call is refused, not allowed.
- A refusal tells the model *"nothing was sent to it"*, so it cannot be talked
into trying another way.
```bash
export DR_OWNED_DOMAINS="example.com,staging.example.com"
```
## The honesty contract
Three rules the agent will not break, because breaking them makes its output
dangerous rather than merely wrong:
1. **Confirmed ≠ candidate.** Always reported separately.
2. **Skipped ≠ clean.** An engine that could not run is listed with its reason.
An empty result means "not tested".
3. **No evidence, no report.** `report` refuses rather than fabricate. A report
that does not reproduce reflects on you, not the tool.
The agent is told the same three rules in its system prompt, and the tools
enforce them independently — a model that forgets is still held to them.
## Sessions
Every conversation is saved to `~/.072gpt/sessions/<id>.json`, mode `0600`,
scoped by the directory you started in. `resume` picks up where you left off;
`fork` branches a copy so you can try another approach without losing the
original. `archive` moves a session out of the picker to
`~/.072gpt/sessions/archive/` without deleting the transcript; `delete` removes
it for good and asks first unless you pass `--force`. Nothing leaves your
machine.
## Tools the agent can call
| Tool | What it does |
|---|---|
| `scope_check` | is this target authorized, and why |
| `scope_list` | everything you may hunt |
| `list_engines` | the vulnerability engine catalogue |
| `surface` | profile a target's stack, get a ranked engine plan |
| `run_engine` | run one engine against a target |
| `hunt` | the full pipeline (minutes) |
| `verify` | replay a request and confirm a finding reproduces |
| `report` | draft a report from evidence — refuses without it |
## Configuration
| Variable | Default | Purpose |
|---|---|---|
| `DR_OWNED_DOMAINS` | *(empty)* | Domains you may hunt. Empty = refuse everything. |
| `DR_AGENT_PROVIDER` | `openai` | `openai`, `anthropic`, `openrouter`, `deepseek`, `groq`, `ollama`, `custom` |
| `DR_AGENT_MODEL` | provider default | model id |
| `DR_AGENT_BASE_URL` | provider default | override the endpoint |
| `DR_AGENT_API_KEY` | — | override whichever provider key is used |
| `DR_AGENT_MAX_STEPS` | `40` | hard cap on agent steps per turn |
| `DR_AGENT_AUTO_APPROVE` | `0` | skip the per-tool confirmation |
| `DR_AGENT_HOME` | `~/.072gpt` | where config and sessions live |
Config lives in `~/.072gpt/config.json` (mode `0600`, because it can hold a
key). Environment always wins over the file.
Any OpenAI-compatible endpoint works as `provider=custom`:
```bash
export DR_AGENT_PROVIDER=custom
export DR_AGENT_BASE_URL=https://your-gateway/v1
export DR_AGENT_MODEL=your-model
```
## What's inside
121 vulnerability engines — SQLi, SSRF, IDOR/BOLA, XSS, JWT, OAuth, GraphQL,
request smuggling, cache poisoning, prototype pollution, subdomain takeover,
and the rest — plus surface profiling, adaptive engine selection, verification,
and report drafting. Engines are discovered from disk, so the catalogue cannot
drift from what is actually present.
The agent loop is deliberately small: think → call a tool → read the result →
repeat, with a step budget and a repeated-call detector so it stops instead of
spinning through your credit.
## Also an MCP server
The same engine set is available over MCP for Claude Code, Cursor, and other
clients:
```bash
072gpt mcp # or: python3 mcp_server_072gpt.py
```
See the code for the 28 exposed tools. The agent is the focus; the MCP server is
the integration path for editors.
## Tests
```bash
python3 tests/run_all.py
```
Nine suites, no network and no model key required.
## License
MIT — see [LICENSE](LICENSE).