@integsec/agentic-pentest-proxy 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,952 +1,124 @@
1
1
  # IntegSec Agentic Pentest Proxy
2
2
 
3
- **Scope enforcement proxy for AI-driven penetration testing.**
3
+ An MCP proxy that checks tool calls against a pentest scope manifest before forwarding them to your MCP tools. It blocks calls it can identify as outside the targets, techniques, or time window you approved, and records decisions in a local audit log.
4
4
 
5
- The IntegSec Agentic Pentest MCP Proxy sits between an AI agent (Claude, GPT, etc.) and an MCP tool server ([TurboPentest](https://turbopentest.com), Nuclei MCP, etc.), checking MCP `tools/call` requests against a scope manifest before forwarding them. It blocks targets, techniques, and engagement times it can identify as unauthorized and writes audit decisions locally.
5
+ **Requires Node.js 22 or newer.** The proxy supports stdio tools, SSE upstreams such as Burp Suite, and HTTP upstreams.
6
6
 
7
- Built by **[IntegSec](https://integsec.com)** — offensive cybersecurity testing and threat simulation for modern organizations moving at AI speed.
7
+ ## Quick start: add an MCP tool
8
8
 
9
- ```
10
- +------------+ JSON-RPC +---------------------+ JSON-RPC +----------------+
11
- | AI Agent | ----------> | IntegSec Agentic | ----------> | Upstream MCP |
12
- | (Claude) | <---------- | Pentest MCP Proxy | <---------- | (TurboPentest) |
13
- +------------+ allow/block | (validate + audit) | forwarded +----------------+
14
- +---------------------+
15
- |
16
- v
17
- +-----------+
18
- | Audit Log |
19
- | (JSONL / |
20
- | Cloud) |
21
- +-----------+
22
- ```
23
-
24
- > **Using AI agents for pentesting?** [TurboPentest](https://turbopentest.com) delivers agentic penetration testing powered by Claude — 15 orchestrated security tools, OWASP Top 10 coverage, results in under 4 hours, blockchain-attested reports. Starting at $99/domain. Use this proxy with MCP servers like Burp Suite, Kali MCP, Nmap, and more for scope-safe autonomous testing.
25
-
26
- ---
27
-
28
- ## Table of Contents
29
-
30
- - [Why This Exists](#why-this-exists)
31
- - [Security Boundaries](#security-boundaries)
32
- - [Features](#features)
33
- - [Supported MCP Servers](#supported-mcp-servers)
34
- - [Quick Start](#quick-start)
35
- - [Installation](#installation)
36
- - [Configuration](#configuration)
37
- - [Scope Manifest](#scope-manifest)
38
- - [Environment Variables](#environment-variables)
39
- - [Technique Mappings](#technique-mappings)
40
- - [Usage](#usage)
41
- - [CLI](#cli)
42
- - [Claude Desktop Integration](#claude-desktop-integration)
43
- - [Claude Code Integration](#claude-code-integration)
44
- - [Burp Suite Integration](#burp-suite-integration)
45
- - [Docker](#docker)
46
- - [HTTP Mode](#http-mode)
47
- - [TUI Monitor](#tui-monitor)
48
- - [How Validation Works](#how-validation-works)
49
- - [Audit Logging](#audit-logging)
50
- - [Examples](#examples)
51
- - [Manifest Builder](#manifest-builder)
52
- - [Contributing](#contributing)
53
- - [Architecture](#architecture)
54
- - [Development Setup](#development-setup)
55
- - [Project Structure](#project-structure)
56
- - [Testing](#testing)
57
- - [Adding a New Audit Backend](#adding-a-new-audit-backend)
58
- - [Adding Tool Extraction Support](#adding-tool-extraction-support)
59
- - [Code Style](#code-style)
60
- - [Roadmap](#roadmap)
61
- - [About IntegSec](#about-integsec)
62
- - [License](#license)
63
-
64
- ---
65
-
66
- ## Why This Exists
67
-
68
- AI agents equipped with offensive security tools (nmap, sqlmap, Metasploit, etc.) can cause serious harm if they stray outside an authorized engagement scope. A misconfigured prompt or hallucinated target can turn a legitimate pentest into an unauthorized attack.
69
-
70
- The IntegSec Agentic Pentest MCP Proxy enforces scope at the protocol layer. Every tool invocation is checked against a scope manifest before it reaches the upstream MCP server. If the target, technique, or timing is wrong, the call is blocked and logged.
71
-
72
- **No prompt engineering. No honor system. Enforcement.**
73
-
74
- ## Security Boundaries
75
-
76
- The proxy checks the arguments it can see in MCP `tools/call` requests. It cannot control destinations chosen inside an upstream tool, HTTP redirects, DNS changes between validation and execution, targets read from files or encoded payloads, or traffic that bypasses MCP. Use network egress controls and review each upstream tool's schema before relying on this proxy for an engagement. Keep free-form commands disabled with the default `ALLOW_UNSTRUCTURED_COMMANDS=false`.
77
-
78
- Cloud logging failures do not stop tool calls. Monitor the writable local audit directory and alert on logging errors. For remote HTTP clients, place the proxy behind TLS and set `PROXY_AUTH_TOKEN`.
79
-
80
-
81
- ---
82
-
83
- ## Features
84
-
85
- - **Multi-stage validation pipeline** — request shape, technique, time window, target extraction, CIDR containment, DNS resolution, exclusion, authorization, default deny
86
- - **Every target checked** — arrays, comma/space-separated lists, nested option objects, and `host:port` values are checked; free-form commands are blocked by default
87
- - **Fail-closed design** — DNS failures, malformed requests, unparseable JSON, internal errors and expired windows all result in blocks; JSON-RPC batches are checked element by element
88
- - **19 tool extractors + smart fallback** — built-in parameter extraction for nmap, sqlmap, burp, curl, metasploit, nuclei, gobuster, ffuf, nikto, and more, with generic fallback for unknown tools
89
- - **Wildcard domain matching** — `*.acme.com` matches `app.acme.com` but not `deep.sub.acme.com`
90
- - **CIDR + IPv6 support** — authorize by IP range, detect RFC-1918 private ranges and cloud metadata endpoints
91
- - **DNS caching with TTL** — parallel A+AAAA resolution with in-flight deduplication
92
- - **Technique blocking** — categorize tools into `dos`, `destructive`, `social_engineering`, etc., with custom mappings
93
- - **Parameter sanitization** — passwords, tokens, API keys, and secrets are redacted before logging
94
- - **Multi-backend audit logging** — local JSONL, AWS CloudWatch, Azure Monitor, GCP Cloud Logging
95
- - **Three transport modes** — stdio (child process), SSE (stdio-to-SSE bridge, e.g. Burp) and HTTP (reverse proxy)
96
- - **Cloud-native manifest loading** — load scope from file, env var, AWS Secrets Manager, Azure Key Vault, or GCP Secret Manager
97
- - **Docker-ready** — multi-stage build, runs as non-root user
98
- - **Zero runtime config files** — everything via environment variables
99
-
100
- ---
101
-
102
- ## Supported MCP Servers
103
-
104
- Built-in target extraction and technique categorization for the following tools and MCP servers. Unlisted tools still receive scope enforcement via the generic parameter fallback (`target`, `url`, `host`, `domain`, etc.).
105
-
106
- ### Subdomain Enumeration
107
- [amass](https://github.com/owasp-amass/amass) · [alterx](https://github.com/projectdiscovery/alterx) · [assetfinder](https://github.com/tomnomnom/assetfinder) · [subfinder](https://github.com/projectdiscovery/subfinder) · [shuffledns](https://github.com/projectdiscovery/shuffledns) · [Hex Strike AI MCP](https://github.com/0x4m4/hexstrike-ai) · [Kali Linux MCP](https://github.com/k3nn3dy-ai/kali-mcp)
108
-
109
- ### DNS & Certificate
110
- [dnsx](https://github.com/projectdiscovery/dnsx) · [cero](https://github.com/glebarez/cero) · [crtsh](https://crt.sh) · [Shodan MCP](https://github.com/BurtTheCoder/mcp-shodan) (BurtTheCoder) · [Shodan MCP](https://github.com/Vorota-ai/shodan-mcp) (Vorota-ai)
111
-
112
- ### HTTP Probing
113
- [httpx](https://github.com/projectdiscovery/httpx) · [katana](https://github.com/projectdiscovery/katana) · [gowitness](https://github.com/sensepost/gowitness) · [Burp Suite MCP](https://github.com/PortSwigger/mcp-server) · [Postman MCP](https://github.com/postmanlabs/postman-mcp-server)
114
-
115
- ### Port Scanning
116
- [nmap](https://github.com/nmap/nmap) · [nmap_scan](https://github.com/nmap/nmap) · [masscan](https://github.com/robertdavidgraham/masscan) · [Nmap MCP Server](https://github.com/mohdhaji87/nmap-mcp-server) · [Awesome Kali MCP Servers](https://github.com/ccq1/awsome_kali_MCPServers) · [Hex Strike AI MCP](https://github.com/0x4m4/hexstrike-ai) · [Kali Linux MCP](https://github.com/k3nn3dy-ai/kali-mcp)
117
-
118
- ### Web App Testing
119
- [nuclei](https://github.com/projectdiscovery/nuclei) · [ffuf](https://github.com/ffuf/ffuf) · [gobuster](https://github.com/OJ/gobuster) · [dirb](https://sourceforge.net/projects/dirb) · [arjun](https://github.com/s0md3v/Arjun) · [sqlmap](https://github.com/sqlmapproject/sqlmap) · [dalfox](https://github.com/hahwul/dalfox) · [smuggler](https://github.com/defparam/smuggler) · [nikto](https://github.com/sullo/nikto) · [wpscan](https://github.com/wpscanteam/wpscan) · [nessus](https://www.tenable.com/products/nessus) · [zap](https://github.com/zaproxy/zaproxy) · [burpsuite](https://portswigger.net/burp) · [burp_scan](https://portswigger.net/burp) · [burp_active_scan](https://portswigger.net/burp) · [Burp Suite MCP](https://github.com/PortSwigger/mcp-server) (PortSwigger) · [Acunetix MCP](https://github.com/therealcoiffeur/MCPwnetix) · [Hex Strike AI MCP](https://github.com/0x4m4/hexstrike-ai) · [Kali Linux MCP](https://github.com/k3nn3dy-ai/kali-mcp) · **Next.js Scanner** · **Unified All-in-One MCP**
120
-
121
- ### SSL/TLS & Headers
122
- **SSLScan MCP** · **HTTP Headers** (Custom MCP) · [Kali Linux MCP](https://github.com/k3nn3dy-ai/kali-mcp)
123
-
124
- ### OSINT & Threat Intel
125
- [uncover](https://github.com/projectdiscovery/uncover) · [waybackurls](https://github.com/tomnomnom/waybackurls) · [shodan](https://www.shodan.io) · [virustotal](https://www.virustotal.com) · [bloodhound](https://github.com/BloodHoundAD/BloodHound) · [notify](https://github.com/projectdiscovery/notify) · [Shodan MCP](https://github.com/BurtTheCoder/mcp-shodan) (BurtTheCoder) · [Shodan MCP](https://github.com/Vorota-ai/shodan-mcp) (Vorota-ai) · [WireMCP](https://github.com/0xKoda/WireMCP) · [VirusTotal MCP](https://github.com/BurtTheCoder/mcp-virustotal)
126
-
127
- ### Exploitation
128
- [metasploit](https://github.com/rapid7/metasploit-framework) · [`msf_*`](https://github.com/rapid7/metasploit-framework) · [hydra](https://github.com/vanhauser-thc/thc-hydra) · [hashcat](https://github.com/hashcat/hashcat) · **CrackMapExec MCP** · **Commix MCP** · [Hex Strike AI MCP](https://github.com/0x4m4/hexstrike-ai) · [Kali Linux MCP](https://github.com/k3nn3dy-ai/kali-mcp)
129
-
130
- ### Cloud Security
131
- [prowler](https://github.com/prowler-cloud/prowler) · [scoutsuite](https://github.com/nccgroup/ScoutSuite)
132
-
133
- ### Container & IaC
134
- [trivy](https://github.com/aquasecurity/trivy) · [checkov](https://github.com/bridgecrewio/checkov)
135
-
136
- ### Kubernetes
137
- [kube-hunter](https://github.com/aquasecurity/kube-hunter) · [kubeaudit](https://github.com/Shopify/kubeaudit) · [kube-bench](https://github.com/aquasecurity/kube-bench)
138
-
139
- ### Code Security
140
- [Semgrep MCP](https://github.com/semgrep/mcp) · [Gitleaks MCP](https://github.com/FuzzingLabs/mcp-security-hub)
141
-
142
- ### Reverse Engineering
143
- [Ghidra MCP](https://github.com/LaurieWired/GhidraMCP)
144
-
145
- ### Mobile Security
146
- [MobSF MCP](https://github.com/pullkitsan/mobsf-mcp-server)
147
-
148
- ---
149
-
150
- ## Quick Start
151
-
152
- ```bash
153
- # Install
154
- npm install -g @integsec/agentic-pentest-proxy
155
-
156
- # Create a scope manifest
157
- cat > scope.json << 'EOF'
158
- {
159
- "engagement_id": "ENG-2025-0042",
160
- "client": "Acme Corp",
161
- "operator": "operator@yourfirm.com",
162
- "authorized_targets": {
163
- "ip_ranges": ["10.10.10.0/24"],
164
- "domains": ["*.acme.com"],
165
- "urls": [],
166
- "cloud_accounts": []
167
- },
168
- "excluded_targets": ["hr.acme.com"],
169
- "authorized_techniques": ["recon", "web_app"],
170
- "excluded_techniques": ["dos", "destructive", "social_engineering"],
171
- "engagement_window": {
172
- "start": "2026-03-27T08:00:00Z",
173
- "end": "2026-04-10T17:00:00Z"
174
- }
175
- }
176
- EOF
177
-
178
- # Run the proxy (stdio mode, wrapping TurboPentest MCP)
179
- SCOPE_MANIFEST_PATH=./scope.json \
180
- UPSTREAM_MCP_COMMAND=npx \
181
- UPSTREAM_MCP_ARGS="-y,@turbopentest/mcp-server" \
182
- integsec-agentic-pentest-proxy
183
- ```
184
-
185
- The proxy will intercept all tool calls, validate targets against scope.json, and log decisions to `./audit/`.
186
-
187
- ---
188
-
189
- ## Installation
190
-
191
- ### npm (global)
192
-
193
- ```bash
194
- npm install -g @integsec/agentic-pentest-proxy
195
- ```
196
-
197
- ### npm (project-local)
198
-
199
- ```bash
200
- npm install @integsec/agentic-pentest-proxy
201
- ```
202
-
203
- ### From source
204
-
205
- ```bash
206
- git clone https://github.com/IntegSec/agentic-pentest-proxy.git
207
- cd agentic-pentest-proxy
208
- npm install
209
- npm run build
210
- ```
211
-
212
- ### Docker
213
-
214
- ```bash
215
- docker build -t integsec-agentic-pentest-proxy .
216
- docker run --rm \
217
- -e SCOPE_MANIFEST_PATH=/scope.json \
218
- -e MCP_TRANSPORT=http \
219
- -e UPSTREAM_MCP_URL=http://host.docker.internal:8080 \
220
- -e PROXY_PORT=9090 \
221
- -e PROXY_AUTH_TOKEN \
222
- -v ./scope.json:/scope.json:ro \
223
- -p 9090:9090 \
224
- integsec-agentic-pentest-proxy
225
- ```
226
-
227
- ---
228
-
229
- ## Configuration
230
-
231
- ### Scope Manifest
232
-
233
- The scope manifest defines the boundaries of a penetration testing engagement. It is validated against a strict Zod schema on load.
234
-
235
- ```jsonc
236
- {
237
- // Unique engagement identifier — used in audit log filenames
238
- "engagement_id": "ENG-2025-0142",
239
-
240
- // Client and operator for audit attribution
241
- "client": "Acme Corp",
242
- "operator": "operator@integsec.com",
243
-
244
- // What the AI agent IS allowed to target
245
- "authorized_targets": {
246
- "ip_ranges": ["10.10.10.0/24", "203.0.113.0/28"],
247
- "domains": ["*.acme.com", "acme-staging.example.com"],
248
- // Authorizes the URL's scheme, host, port and path prefix
249
- "urls": ["https://app.acme.com", "https://api.acme.com"],
250
- // Matched against account parameters of cloud audit tools (prowler, scoutsuite)
251
- "cloud_accounts": ["aws:123456789012"]
252
- },
253
-
254
- // Override: these are NEVER allowed even if they match above.
255
- // Accepts IPs, CIDRs ("203.0.113.0/30"), hostnames, wildcards ("*.hr.acme.com",
256
- // any depth) and URLs (compared by hostname).
257
- "excluded_targets": ["203.0.113.5", "hr.acme.com"],
258
-
259
- // Allowed technique categories. When non-empty, a tool in any OTHER known
260
- // category is blocked. Uncategorized tools are unaffected. [] = no restriction.
261
- "authorized_techniques": ["recon", "web_app"],
9
+ 1. Install the proxy:
262
10
 
263
- // Tool categories that are always blocked (wins over authorized_techniques)
264
- "excluded_techniques": ["dos", "destructive", "social_engineering"],
265
-
266
- // Time window — calls outside this range are blocked
267
- "engagement_window": {
268
- "start": "2026-03-26T08:00:00Z",
269
- "end": "2026-04-09T17:00:00Z"
270
- }
271
- }
272
- ```
273
-
274
- **Loading priority:** The proxy checks these sources in order and uses the first one found:
275
-
276
- 1. `SCOPE_MANIFEST_JSON` — inline JSON in env var
277
- 2. `SCOPE_MANIFEST_PATH` — path to a local JSON file
278
- 3. `SCOPE_MANIFEST_SECRET_ARN` — AWS Secrets Manager
279
- 4. `SCOPE_MANIFEST_KEYVAULT_URI` — Azure Key Vault
280
- 5. `SCOPE_MANIFEST_GCP_SECRET` — GCP Secret Manager
281
-
282
- ### Environment Variables
283
-
284
- | Variable | Default | Description |
285
- |----------|---------|-------------|
286
- | **Manifest (one required)** | | |
287
- | `SCOPE_MANIFEST_PATH` | — | Path to scope manifest JSON file |
288
- | `SCOPE_MANIFEST_JSON` | — | Inline scope manifest JSON string |
289
- | `SCOPE_MANIFEST_SECRET_ARN` | — | AWS Secrets Manager ARN |
290
- | `SCOPE_MANIFEST_KEYVAULT_URI` | — | Azure Key Vault secret URI |
291
- | `SCOPE_MANIFEST_GCP_SECRET` | — | GCP Secret Manager resource name |
292
- | **Transport** | | |
293
- | `MCP_TRANSPORT` | `stdio` | `stdio` (spawn upstream), `sse` (agent on stdio, upstream over SSE — e.g. Burp) or `http` (listen on `PROXY_HOST:PROXY_PORT`, reverse-proxy to upstream). Anything else is a startup error |
294
- | `UPSTREAM_MCP_COMMAND` | — | Command to spawn upstream MCP (stdio mode) |
295
- | `UPSTREAM_MCP_ARGS` | — | Comma-separated args for upstream command |
296
- | `UPSTREAM_STARTUP_DELAY_MS` | `0` | stdio mode: hold messages until the upstream prints or this delay passes. Only needed for bridges that drop early messages |
297
- | `UPSTREAM_MCP_URL` | — | Upstream MCP URL (`sse` and `http` modes) |
298
- | `PROXY_PORT` | `9090` | Listen port (`http` mode) |
299
- | `PROXY_HOST` | `127.0.0.1` | Listen address (`http` mode). The Docker image sets `0.0.0.0` |
300
- | `PROXY_AUTH_TOKEN` | — | Required for non-loopback HTTP. Clients send it in `X-Proxy-Token`; use TLS termination for remote clients |
301
- | `ALLOW_UNSTRUCTURED_COMMANDS` | `false` | Explicitly opt in to heuristic inspection of free-form command and argument fields; unsafe for strict scope enforcement |
302
- | **Audit** | | |
303
- | `AUDIT_LOG_PATH` | `./audit/` | Directory for local JSONL audit logs |
304
- | `AWS_LOG_GROUP` | — | AWS CloudWatch log group name |
305
- | `AWS_REGION` | — | AWS region for CloudWatch |
306
- | `AZURE_LOG_INGESTION_ENDPOINT` | — | DCR or DCE Logs Ingestion endpoint URL |
307
- | `AZURE_DCR_IMMUTABLE_ID` | — | Azure Data Collection Rule immutable ID |
308
- | `AZURE_DCR_STREAM_NAME` | `Custom-MCPProxyAudit_CL` | Azure DCR stream name |
309
- | `GOOGLE_CLOUD_PROJECT` | — | GCP project ID for Cloud Logging |
310
- | **Tuning** | | |
311
- | `TECHNIQUE_MAP_PATH` | — | Path to custom technique mappings JSON |
312
- | `DNS_CACHE_TTL` | `60` | DNS cache TTL in seconds |
313
- | `LOG_LEVEL` | `INFO` | Log verbosity |
314
- | `PROXY_VERSION` | `0.2.6` | Version string in audit entries |
315
-
316
- See [`.env.example`](.env.example) for a complete template.
317
-
318
- ### Technique Mappings
319
-
320
- The proxy ships with built-in technique categories: `dos`, `destructive`, `social_engineering`, `recon`, `web_app`, `exploitation` and `cloud_audit` (see `src/technique-checker.ts` for the tool lists). Use these names in `authorized_techniques` / `excluded_techniques`.
321
-
322
- `exact` entries match the whole tool name. `patterns` containing a separator (`nmap_`, `msf_`) match as substrings; purely alphanumeric patterns match whole words of the tool name or the end of a word (`dos` matches `dos_attack` and `ddos` but not `get_dossier`). All matching is case-insensitive.
323
-
324
- You can extend these with a custom mapping file:
325
-
326
- ```json
327
- {
328
- "wireless": {
329
- "exact": ["aircrack-ng", "wifite", "kismet"],
330
- "patterns": ["wifi", "wireless"]
331
- },
332
- "physical": {
333
- "exact": ["lockpick_sim"],
334
- "patterns": ["physical"]
335
- }
336
- }
337
- ```
338
-
339
- Point `TECHNIQUE_MAP_PATH` at this file. Custom mappings are merged with built-in ones — they don't replace them. A missing or malformed file stops the proxy at startup rather than silently dropping your blocks.
340
-
341
- ---
342
-
343
- ## Usage
344
-
345
- ### CLI
346
-
347
- ```bash
348
- # stdio mode — wrap any MCP server
349
- SCOPE_MANIFEST_PATH=./scope.json \
350
- UPSTREAM_MCP_COMMAND=npx \
351
- UPSTREAM_MCP_ARGS="-y,@turbopentest/mcp-server" \
352
- integsec-agentic-pentest-proxy
353
-
354
- # HTTP mode — reverse proxy to a running MCP server (listens on 127.0.0.1:9090)
355
- SCOPE_MANIFEST_PATH=./scope.json \
356
- MCP_TRANSPORT=http \
357
- UPSTREAM_MCP_URL=http://localhost:8080 \
358
- PROXY_PORT=9090 \
359
- integsec-agentic-pentest-proxy
360
-
361
- # SSE mode — agent talks stdio, proxy connects to an SSE upstream (no listening port)
362
- SCOPE_MANIFEST_PATH=./scope.json \
363
- MCP_TRANSPORT=sse \
364
- UPSTREAM_MCP_URL=http://127.0.0.1:9876 \
365
- integsec-agentic-pentest-proxy
366
- ```
367
-
368
- In HTTP mode, point your MCP client at the proxy using the same path it would use on the upstream (e.g. `http://127.0.0.1:9090/mcp`). For a non-loopback listener, set `PROXY_AUTH_TOKEN` and configure the client to send `X-Proxy-Token`. Terminate TLS before the proxy when clients connect over a network.
369
-
370
- ### Claude Desktop Integration
371
-
372
- Add to your Claude Desktop `claude_desktop_config.json`:
373
-
374
- ```json
375
- {
376
- "mcpServers": {
377
- "turbopentest-scoped": {
378
- "command": "npx",
379
- "args": ["-y", "@integsec/agentic-pentest-proxy"],
380
- "env": {
381
- "SCOPE_MANIFEST_PATH": "/path/to/scope.json",
382
- "MCP_TRANSPORT": "stdio",
383
- "UPSTREAM_MCP_COMMAND": "npx",
384
- "UPSTREAM_MCP_ARGS": "-y,@turbopentest/mcp-server",
385
- "AUDIT_LOG_PATH": "./audit/"
386
- }
387
- }
388
- }
389
- }
390
- ```
391
-
392
- ### Claude Code Integration
393
-
394
- Add to your `.mcp.json` or project settings:
395
-
396
- ```json
397
- {
398
- "mcpServers": {
399
- "turbopentest-scoped": {
400
- "command": "npx",
401
- "args": ["-y", "@integsec/agentic-pentest-proxy"],
402
- "env": {
403
- "SCOPE_MANIFEST_PATH": "./scope.json",
404
- "UPSTREAM_MCP_COMMAND": "npx",
405
- "UPSTREAM_MCP_ARGS": "-y,@turbopentest/mcp-server"
406
- }
407
- }
408
- }
409
- }
410
- ```
411
-
412
- ### Burp Suite Integration
413
-
414
- The proxy connects directly to Burp Suite's MCP extension via SSE — no Java bridge jar needed.
415
-
416
- 1. Open Burp Suite Pro and enable the MCP extension (listening on port 9876)
417
- 2. Add to your `claude_desktop_config.json`:
418
-
419
- ```json
420
- {
421
- "mcpServers": {
422
- "burp-scoped": {
423
- "command": "integsec-agentic-pentest-proxy",
424
- "args": [],
425
- "env": {
426
- "SCOPE_MANIFEST_PATH": "/path/to/scope.json",
427
- "MCP_TRANSPORT": "sse",
428
- "UPSTREAM_MCP_URL": "http://127.0.0.1:9876",
429
- "AUDIT_LOG_PATH": "/path/to/audit"
430
- }
431
- }
432
- }
433
- }
434
- ```
435
-
436
- The proxy validates `targetHostname` in Burp's `send_http1_request`, `send_http2_request`, `create_repeater_tab`, and `send_to_intruder` tools — blocking requests to out-of-scope targets.
437
-
438
- ### Docker
439
-
440
- ```bash
441
- # HTTP mode (the image sets PROXY_HOST=0.0.0.0 so the published port is reachable)
442
- docker run --rm \
443
- -e SCOPE_MANIFEST_PATH=/scope.json \
444
- -e MCP_TRANSPORT=http \
445
- -e UPSTREAM_MCP_URL=http://host.docker.internal:8080 \
446
- -e PROXY_PORT=9090 \
447
- -e PROXY_AUTH_TOKEN \
448
- -v ./scope.json:/scope.json:ro \
449
- -v ./audit:/app/audit \
450
- -p 9090:9090 \
451
- integsec-agentic-pentest-proxy
452
-
453
- # With AWS CloudWatch
454
- docker run --rm \
455
- -e SCOPE_MANIFEST_SECRET_ARN=arn:aws:secretsmanager:us-east-1:123456789012:secret:scope \
456
- -e MCP_TRANSPORT=http \
457
- -e UPSTREAM_MCP_URL=http://host.docker.internal:8080 \
458
- -e AWS_LOG_GROUP=/integsec/mcp-proxy \
459
- -e AWS_REGION=us-east-1 \
460
- -e PROXY_AUTH_TOKEN \
461
- -p 9090:9090 \
462
- integsec-agentic-pentest-proxy
463
- ```
464
-
465
- ---
466
-
467
- ## TUI Monitor
468
-
469
- A real-time terminal dashboard for monitoring proxy decisions as they happen.
470
-
471
- ```bash
472
- # Monitor the default audit directory
473
- integsec-agentic-pentest-tui
474
-
475
- # Monitor a specific directory
476
- integsec-agentic-pentest-tui --audit-path /path/to/audit
477
-
478
- # Filter to a specific engagement
479
- integsec-agentic-pentest-tui --engagement ENG-2026-TEST-001
480
- ```
481
-
482
- The TUI displays three panels:
483
-
484
- - **Engagement Header** — engagement ID, client, operator
485
- - **Stats Panel** — running allowed/blocked counts, top targets, top tools
486
- - **Live Feed** — color-coded scrolling decision feed (green = allowed, red = blocked)
487
-
488
- Run the TUI in a separate terminal while the proxy is active (via Claude Desktop, Claude Code, or CLI). It tails the audit JSONL files and updates in real time.
489
-
490
- ---
491
-
492
- ## How Validation Works
493
-
494
- Every `tools/call` JSON-RPC message (including each element of a JSON-RPC batch) passes through this pipeline:
495
-
496
- ```
497
- 0. REQUEST SHAPE ────▶ Tool name a string? Arguments a JSON object?
498
- │ NO → BLOCKED_INVALID_REQUEST
499
- ▼
500
- 1. TECHNIQUE CHECK ──▶ Tool in an excluded_techniques category, or in a known
501
- │ category missing from a non-empty authorized_techniques?
502
- │ YES → BLOCKED_TECHNIQUE
503
- ▼
504
- 2. TIME WINDOW ──────▶ Is current time within engagement_window?
505
- │ NO → BLOCKED_OUTSIDE_WINDOW
506
- ▼
507
- COMMAND CHECK ─────▶ Free-form command fields present without opt-in?
508
- │ YES → BLOCKED_UNINSPECTABLE_COMMAND
509
- ▼
510
- 3. TARGET EXTRACTION ▶ Extract EVERY hostname/IP/CIDR from the parameters
511
- │ (tool mappings + fallback names, arrays, lists,
512
- │ nested objects)
513
- ▼
514
- 4. NO TARGET? ───────▶ No target found?
515
- │ YES → ALLOWED_NO_TARGET only for explicitly safe local tools
516
- │ otherwise → BLOCKED_INVALID_REQUEST
517
- ▼
518
- For each target — any block blocks the whole call:
519
- 5. CLOUD ACCOUNT ────▶ Matches authorized cloud_accounts? → ALLOWED
520
- 6. CIDR TARGET ──────▶ Overlaps an exclusion → BLOCKED_EXCLUDED_TARGET
521
- │ Fully inside an authorized range → ALLOWED
522
- │ Otherwise → BLOCKED_NOT_IN_SCOPE
523
- ▼
524
- 7. DNS RESOLUTION ───▶ A + AAAA, falling back to the OS resolver
525
- │ No addresses → BLOCKED_DNS_FAILED
526
- ▼
527
- 8. EXCLUSION CHECK ──▶ Host or any resolved IP matches excluded_targets?
528
- │ YES → BLOCKED_EXCLUDED_TARGET
529
- ▼
530
- 9. AUTHORIZATION ────▶ Host matches a domain, IP range or URL prefix?
531
- │ resolves to loopback/link-local/metadata not in
532
- │ ip_ranges → BLOCKED_RESTRICTED_IP, else ALLOWED
533
- │ Resolved IP in an authorized ip_range? → ALLOWED
534
- ▼
535
- 10. DEFAULT DENY ────▶ BLOCKED_NOT_IN_SCOPE
536
- ```
537
-
538
- **Key design decisions:**
539
- - **Every target must pass.** `targets: ["10.10.10.5", "8.8.8.8"]` is blocked because of the second element.
540
- - **Exclusions beat authorizations.** If `hr.acme.com` is in `excluded_targets`, it's blocked even if `*.acme.com` is authorized — with or without a trailing dot, in any letter case. A CIDR target that *contains* an excluded IP is blocked.
541
- - **DNS failures are blocks.** If the proxy can't resolve a hostname, it won't forward the call. Fail closed.
542
- - **Restricted addresses require explicit authorization.** An authorized domain that resolves to loopback, link-local or a cloud metadata endpoint (169.254.169.254) is blocked unless that IP appears in `authorized_targets.ip_ranges`. Private RFC-1918 addresses reached through an authorized domain are allowed (internal engagements); reached directly, they need an `ip_ranges` entry like any other IP.
543
- - **Unparseable input is never forwarded.** Invalid JSON gets a JSON-RPC parse error (`-32700`) instead of being passed to an upstream whose parser may be more lenient.
544
- - **Batches are all-or-nothing.** If any tool call in a JSON-RPC batch is blocked, the whole batch is rejected with one error per request.
545
- - **No target is denied by default.** Only the explicitly listed local tools (`whoami`, `date`, `ls`, `list_tools`, `get_version`, `list_pentests`) may pass without a target. Free-form command fields are blocked unless `ALLOW_UNSTRUCTURED_COMMANDS=true` is set; that opt-in relies on incomplete heuristic extraction and is unsuitable when the proxy is the only scope control.
546
-
547
- ---
548
-
549
- ## Audit Logging
550
-
551
- Every validation decision produces an audit entry:
552
-
553
- ```json
554
- {
555
- "timestamp": "2026-03-27T14:32:01.000Z",
556
- "engagement_id": "ENG-2025-0142",
557
- "client": "Acme Corp",
558
- "operator": "operator@integsec.com",
559
- "tool_name": "nmap_scan",
560
- "tool_parameters": { "target": "10.10.10.5", "flags": "[REDACTED]" },
561
- "extracted_target": "10.10.10.5",
562
- "resolved_ips": ["10.10.10.5"],
563
- "decision": "ALLOWED",
564
- "decision_reason": "Target 10.10.10.5 matches authorized IP range 10.10.10.0/24",
565
- "matched_scope_item": "10.10.10.0/24",
566
- "duration_ms": 2,
567
- "proxy_version": "0.2.6"
568
- }
569
- ```
570
-
571
- ### Backends
572
-
573
- | Backend | Config | Format |
574
- |---------|--------|--------|
575
- | **Local** (always active) | `AUDIT_LOG_PATH` | JSONL files: `{engagement_id}.jsonl` |
576
- | **AWS CloudWatch** | `AWS_LOG_GROUP` + `AWS_REGION` | Log events in `{engagement_id}/{date}` stream |
577
- | **Azure Monitor** | `AZURE_LOG_INGESTION_ENDPOINT` + `AZURE_DCR_IMMUTABLE_ID` | Logs Ingestion API via Data Collection Rules |
578
- | **GCP Cloud Logging** | `GOOGLE_CLOUD_PROJECT` | Cloud Logging entries with severity mapping |
579
-
580
- Multiple backends can be active simultaneously. The local JSONL entry is written to disk before the call is forwarded, so the local trail survives an abrupt kill. Cloud backends are buffered and flushed every 5 seconds. Backend failures are isolated — a CloudWatch error won't affect local logging.
581
-
582
- ### Decision Types
583
-
584
- | Decision | Meaning |
585
- |----------|---------|
586
- | `ALLOWED` | Target matches an authorized scope item |
587
- | `ALLOWED_NO_TARGET` | Tool is on the explicit targetless local-tool list |
588
- | `BLOCKED_TECHNIQUE` | Tool belongs to an excluded technique category, or a known category not in `authorized_techniques` |
589
- | `BLOCKED_OUTSIDE_WINDOW` | Current time is outside the engagement window |
590
- | `BLOCKED_EXCLUDED_TARGET` | Target (or a range containing it) is explicitly excluded |
591
- | `BLOCKED_NOT_IN_SCOPE` | Target doesn't match any authorized scope item |
592
- | `BLOCKED_DNS_FAILED` | DNS resolution returned no addresses |
593
- | `BLOCKED_RESTRICTED_IP` | Authorized hostname resolves to loopback/link-local/cloud metadata not listed in `ip_ranges` |
594
- | `BLOCKED_INVALID_REQUEST` | Tool name or arguments malformed — cannot be validated |
595
- | `BLOCKED_UNINSPECTABLE_COMMAND` | Free-form command or argument field cannot be reliably scoped |
596
- | `BLOCKED_INTERNAL_ERROR` | Validation threw unexpectedly — failed closed |
597
-
598
- ---
599
-
600
- ## Examples
601
-
602
- See the [`examples/`](examples/) directory for:
603
-
604
- - **[`scope-manifest.json`](examples/scope-manifest.json)** — a real-world scope manifest
605
- - **[`claude-desktop-config.json`](examples/claude-desktop-config.json)** — Claude Desktop integration config
606
- - **[`technique-map.json`](examples/technique-map.json)** — custom technique category mappings
607
-
608
- ---
609
-
610
- ## Manifest Builder
611
-
612
- Build scope manifests interactively with smart validation, or share a web form with clients for scope intake.
613
-
614
- ### Quick Start
615
-
616
- ```bash
617
- # Create a new manifest interactively
618
- integsec-agentic-pentest-manifest new
619
-
620
- # Create from a template
621
- integsec-agentic-pentest-manifest new --from template.json -o scope.json
622
-
623
- # Edit an existing manifest
624
- integsec-agentic-pentest-manifest edit scope.json
625
-
626
- # Review a client submission
627
- integsec-agentic-pentest-manifest review submission.pending.json
628
- ```
629
-
630
- ### Client Intake (Web Form)
631
-
632
- Share a web-based form with clients so they can define their own scope:
633
-
634
- ```bash
635
- # Local only (default — localhost:9471)
636
- integsec-agentic-pentest-manifest serve --template engagement-template.json
637
-
638
- # Network-accessible (TLS required)
639
- integsec-agentic-pentest-manifest serve \
640
- --host 0.0.0.0 \
641
- --tls-cert ./certs/server.pem \
642
- --tls-key ./certs/server-key.pem \
643
- --template engagement-template.json
644
- ```
645
-
646
- **Workflow:**
647
- 1. Operator creates a template with engagement info, time window, and technique restrictions
648
- 2. Operator runs `serve` and shares the URL with the client
649
- 3. Client fills in their targets (domains, IPs, exclusions) via the web form
650
- 4. Client submits — saved as `.pending.json`
651
- 5. Operator reviews: `integsec-agentic-pentest-manifest review submission.pending.json`
652
- 6. Operator approves, edits, or rejects
653
-
654
- **Security:** The web server binds to `127.0.0.1` by default. Exposing on `0.0.0.0` requires `--tls-cert` and `--tls-key` — the server refuses to start over plaintext on non-localhost interfaces.
655
-
656
- ### Smart Validation
657
-
658
- The builder validates your manifest as you build it:
659
-
660
- - **Format checks** — valid CIDRs, ISO 8601 dates, non-empty required fields
661
- - **Live DNS resolution** — resolves domains and shows their IPs
662
- - **Overlap detection** — warns when domains resolve to IPs already covered by CIDR ranges
663
- - **Broad range warnings** — flags CIDR ranges wider than /16
664
- - **Wildcard/apex prompts** — suggests adding `acme.com` when `*.acme.com` is entered
665
- - **Exclusion checks** — warns if an excluded target isn't within any authorized range
666
-
667
- ### Dry-Run Preview
668
-
669
- Before saving, the builder runs synthetic tool calls against your manifest to preview what the proxy will allow and block. This catches scope misconfigurations before an engagement starts.
670
-
671
- ---
672
-
673
- ## Contributing
674
-
675
- Contributions are welcome. The IntegSec Agentic Pentest MCP Proxy is an open-source project under the Apache 2.0 license.
676
-
677
- ### Architecture
678
-
679
- ```
680
- bin/
681
- integsec-agentic-pentest-proxy.ts CLI entry point — loads config, manifest, starts transport
682
-
683
- src/
684
- proxy.ts ScopeEnforcementProxy — core orchestrator
685
- validator.ts ScopeValidator — validation pipeline
686
- extractor.ts Target extraction from tool parameters (19 tools + fallback)
687
- domain-matcher.ts Wildcard and exact domain matching
688
- ip-matcher.ts CIDR matching, RFC-1918 detection
689
- dns-resolver.ts Caching DNS resolver with deduplication
690
- technique-checker.ts Tool → technique category mapping
691
- sanitizer.ts Parameter redaction for audit logs
692
- manifest.ts Manifest loading (file, env, AWS, Azure, GCP)
693
- manifest-schema.ts Zod schema for scope manifest
694
- config.ts Environment variable loader
695
- types.ts TypeScript type definitions
696
-
697
- audit/
698
- index.ts AuditLogger facade — manages multiple backends
699
- local.ts Local JSONL file logger
700
- cloudwatch.ts AWS CloudWatch backend
701
- azure-monitor.ts Azure Monitor backend
702
- gcp-logging.ts GCP Cloud Logging backend
703
-
704
- transports/
705
- stdio.ts stdio transport — spawns upstream as child process
706
- http.ts HTTP reverse proxy transport
707
- ```
708
-
709
- ### Development Setup
710
-
711
- ```bash
712
- # Clone the repo
713
- git clone https://github.com/IntegSec/agentic-pentest-proxy.git
714
- cd agentic-pentest-proxy
715
-
716
- # Install dependencies
717
- npm install
718
-
719
- # Build
720
- npm run build
721
-
722
- # Run tests
723
- npm test
724
-
725
- # Watch mode (rebuild on change)
726
- npm run dev
727
-
728
- # Type check without emitting
729
- npm run lint
730
- ```
731
-
732
- **Requirements:**
733
- - Node.js >= 22.0.0
734
- - npm >= 9
735
-
736
- ### Project Structure
737
-
738
- The codebase follows these principles:
739
-
740
- - **Pure TypeScript, ES modules** — no CommonJS, no bundler
741
- - **Zod for runtime validation** — all external data is schema-validated
742
- - **Fail-closed security** — when in doubt, block
743
- - **Isolated backends** — failures in one audit backend never affect others
744
- - **No classes where functions suffice** — classes only for stateful components (DnsResolver, AuditLogger, ScopeEnforcementProxy)
745
- - **No external HTTP framework** — uses Node.js built-in `http` module for the HTTP transport
746
-
747
- ### Testing
748
-
749
- Tests use [Vitest](https://vitest.dev/) and are organized into unit and integration suites.
750
-
751
- ```bash
752
- # Run all tests
753
- npm test
11
+ ```bash
12
+ npm install -g @integsec/agentic-pentest-proxy
13
+ ```
754
14
 
755
- # Run tests in watch mode
756
- npm run test:watch
15
+ 2. Create a scope manifest with the guided wizard:
757
16
 
758
- # Run a specific test file
759
- npx vitest run tests/unit/validator.test.ts
760
- ```
761
-
762
- **Test structure:**
17
+ ```bash
18
+ integsec-agentic-pentest-manifest new -o scope.json
19
+ ```
763
20
 
764
- ```
765
- tests/
766
- unit/
767
- validator.test.ts Validation pipeline (comprehensive)
768
- extractor.test.ts Target extraction for 19 tools + fallback
769
- domain-matcher.test.ts Domain pattern matching
770
- ip-matcher.test.ts CIDR and private IP detection
771
- dns-resolver.test.ts DNS caching and deduplication
772
- manifest-schema.test.ts Scope manifest schema validation
773
- manifest.test.ts Manifest loading from all sources
774
- technique-checker.test.ts Technique categorization
775
- sanitizer.test.ts Parameter redaction
776
- audit-local.test.ts Local audit file writing
777
- smoke.test.ts Module import sanity check
778
- integration/
779
- proxy.test.ts Full message flow through proxy
780
- fixtures/
781
- scope-valid.json Valid scope manifest
782
- scope-expired.json Expired scope manifest
783
- tool-calls.json Sample JSON-RPC messages
784
- ```
21
+ Set the real engagement targets and time window. Review the generated file with the engagement owner before using it.
785
22
 
786
- **Writing tests:**
787
- - Every new module should have a corresponding test file in `tests/unit/`
788
- - Use the fixtures in `tests/fixtures/` for scope manifests and tool call payloads
789
- - Mock DNS and cloud SDKs in unit tests; integration tests use the full proxy
790
- - Aim for edge cases: invalid inputs, boundary conditions, Unicode domains, IPv6, etc.
23
+ 3. Generate a client entry for **each** MCP tool. Put the tool's normal launch command after `--`:
791
24
 
792
- ### Adding a New Audit Backend
25
+ ```bash
26
+ integsec-agentic-pentest-setup --name scanner-scoped --manifest ./scope.json -- npx -y @example/scanner-mcp
27
+ ```
793
28
 
794
- 1. Create `src/audit/your-backend.ts` implementing the `AuditBackend` interface:
795
- ```typescript
796
- export interface AuditBackend {
797
- name: string;
798
- write(entries: AuditEntry[]): Promise<void>;
29
+ Replace `npx -y @example/scanner-mcp` with the command from your tool's own setup instructions. The command prints an `mcpServers` entry. Paste that entry into your MCP client's configuration and restart the client. To add another tool, run setup again with a new `--name`, then add its entry under the same `mcpServers` object.
30
+
31
+ For example, the generated entry has this shape (the setup command fills in your actual manifest and audit paths):
32
+
33
+ ```json
34
+ {
35
+ "mcpServers": {
36
+ "scanner-scoped": {
37
+ "command": "integsec-agentic-pentest-proxy",
38
+ "env": {
39
+ "SCOPE_MANIFEST_PATH": "/path/to/scope.json",
40
+ "MCP_TRANSPORT": "stdio",
41
+ "AUDIT_LOG_PATH": "/path/to/audit",
42
+ "UPSTREAM_MCP_COMMAND": "npx",
43
+ "UPSTREAM_MCP_ARGS_JSON": "[\"-y\",\"@example/scanner-mcp\"]"
44
+ }
45
+ }
46
+ }
799
47
  }
800
48
  ```
801
- 2. Add it to the AuditLogger in `bin/integsec-agentic-pentest-proxy.ts` when the relevant env vars are set.
802
- 3. Add a unit test in `tests/unit/audit-your-backend.test.ts`.
803
- 4. Document the env vars in this README and `.env.example`.
804
-
805
- ### Adding Tool Extraction Support
806
-
807
- To add target extraction for a new tool, edit `src/extractor.ts`:
808
-
809
- 1. Add the tool name to the `TOOL_MAPPINGS` array with its target parameter name(s).
810
- 2. If the tool uses a non-standard parameter format, add a case to the extraction logic.
811
- 3. Add test cases in `tests/unit/extractor.test.ts`.
812
-
813
- ### Code Style
814
-
815
- - TypeScript strict mode
816
- - No `any` types — use `unknown` and narrow
817
- - Explicit return types on exported functions
818
- - No default exports — use named exports
819
- - Keep functions small and focused
820
- - Security-sensitive code gets extra test coverage
821
-
822
- ---
823
49
 
824
- ## Roadmap
50
+ Use the `mcpServers` block in Claude Desktop's MCP configuration or in your Claude Code project's `.mcp.json`. Other MCP clients may label the server settings differently; use the generated command and environment variables in their equivalent fields. The proxy starts when the client launches the tool.
825
51
 
826
- The following is the planned development roadmap for the IntegSec Agentic Pentest MCP Proxy. Items are grouped by phase and roughly ordered by priority within each phase.
52
+ 4. Watch decisions in another terminal:
827
53
 
828
- ### Phase 1 — Core Hardening (v0.2)
829
-
830
- - [ ] **Signed scope manifests** — Ed25519 signatures on manifests to prevent tampering, with key pinning
831
- - [ ] **Manifest hot-reload** — watch manifest file for changes and reload without restart
832
- - [ ] **Scope manifest v2 schema** — add per-tool overrides, port ranges, and protocol restrictions
833
- - [ ] **Rate limiting** — per-tool and per-target rate limits to prevent runaway agents
834
- - [ ] **Metrics endpoint** — Prometheus `/metrics` with counters for allowed/blocked decisions, latency histograms
835
- - [ ] **WebSocket transport** — support MCP over WebSocket for persistent connections
836
- - [ ] **Plugin system for validators** — allow custom validation steps via a plugin interface
837
-
838
- ### Phase 2 — Interception & Manipulation Engine (v0.3)
839
-
840
- > Burp Suite-style interception, inspection, and modification of MCP tool calls in real time.
54
+ ```bash
55
+ integsec-agentic-pentest-tui --audit-path ./audit
56
+ ```
841
57
 
842
- - [ ] **Intercept mode** — pause tool calls before forwarding, allowing human review and approval
843
- - [ ] **Request modification** — edit tool parameters before forwarding (e.g., add `--safe-mode` flags, restrict scan intensity)
844
- - [ ] **Response modification** — filter or transform upstream responses before they reach the AI agent
845
- - [ ] **Replay engine** — capture and replay tool call sequences for testing and training
846
- - [ ] **Match & replace rules** — regex-based rules to automatically rewrite parameters (e.g., replace hostnames, inject headers)
847
- - [ ] **Breakpoints** — conditional breakpoints on tool name, target, technique, or parameter patterns
848
- - [ ] **Interception history** — searchable log of all intercepted, modified, forwarded, and dropped messages
849
- - [ ] **Scope diff viewer** — visual diff showing what the agent requested vs. what was actually forwarded
850
- - [ ] **Redirection engine** — reroute tool calls to alternative targets (e.g., redirect production targets to staging, honeypots, or simulation environments)
851
- - [ ] **Upstream multiplexing** — forward a single tool call to multiple upstream servers simultaneously for comparison or redundancy
58
+ Setup prints the exact audit path to use. If your shell is in another directory, use that printed path. For a one-off TUI without a global install:
852
59
 
853
- ### Phase 3 — Terminal UI (v0.4)
60
+ ```bash
61
+ npm exec --yes --package=@integsec/agentic-pentest-proxy -- integsec-agentic-pentest-tui --audit-path ./audit
62
+ ```
854
63
 
855
- > A real-time terminal dashboard for monitoring and controlling the proxy from the command line.
64
+ The TUI reads local audit files; it does not start the proxy. [See TUI screenshots](docs/tui.md).
856
65
 
857
- - [ ] **Live decision feed** — streaming view of ALLOWED/BLOCKED decisions as they happen
858
- - [ ] **Scope summary panel** — display active engagement info, authorized targets, and time window countdown
859
- - [ ] **Audit log viewer** — browse and filter audit entries with keyboard navigation
860
- - [ ] **Intercept queue** — review, approve, modify, or drop pending intercepted tool calls from the TUI
861
- - [ ] **Target heatmap** — ASCII visualization of which targets are being hit and how often
862
- - [ ] **Technique breakdown** — live stats on tool categories being used
863
- - [ ] **Session management** — start, pause, resume, and terminate proxy sessions
864
- - [ ] **Keyboard shortcuts** — vim-style bindings for rapid navigation
865
- - [ ] **Multi-pane layout** — configurable split views (decisions + audit + intercept queue)
866
- - [ ] **Dark/light themes** — because terminal aesthetics matter
66
+ ![Fictional TUI session showing allowed and blocked MCP calls](docs/images/tui-out-of-scope.png)
867
67
 
868
- ### Phase 4 — Web GUI (v0.5)
68
+ ## Other MCP tool types
869
69
 
870
- > Full-featured browser-based interface for teams, with collaboration features.
70
+ | Tool connection | What to do |
71
+ | --- | --- |
72
+ | **stdio** tool launched by a command | Use the setup command above with `-- <command> [args...]`. |
73
+ | **SSE** upstream already listening, such as Burp Suite | Use `integsec-agentic-pentest-setup --name burp-scoped --manifest ./scope.json --sse http://127.0.0.1:9876`. |
74
+ | **HTTP** upstream | Run the proxy as an HTTP service and point your MCP client at it. [HTTP and Docker guide](docs/integrations.md#http-and-docker). |
871
75
 
872
- - [ ] **Dashboard** — real-time overview of active engagements, decision rates, and alerts
873
- - [ ] **Scope manifest editor** — visual editor with validation, preview, and version history
874
- - [ ] **Audit explorer** — filterable, sortable table of all audit entries with export (CSV, JSON)
875
- - [ ] **Intercept workspace** — browser-based intercept, modify, and forward interface with syntax highlighting
876
- - [ ] **Request/response inspector** — detailed view of tool call parameters, extracted targets, DNS results, and validation steps
877
- - [ ] **Engagement timeline** — chronological visualization of all tool calls with scope boundary overlay
878
- - [ ] **Team collaboration** — multi-user access with role-based permissions (operator, reviewer, read-only)
879
- - [ ] **Engagement management** — create, clone, archive, and compare scope manifests across engagements
880
- - [ ] **Alert rules** — configurable notifications (email, Slack, webhook) on scope violations or anomalous patterns
881
- - [ ] **Report generation** — exportable engagement summary with decision statistics, target coverage, and compliance evidence
882
- - [ ] **API** — REST/GraphQL API for programmatic access to all GUI features
76
+ Use one generated client entry per upstream tool. A single scope manifest can be shared by several entries; each call still gets checked. [More client examples](docs/integrations.md).
883
77
 
884
- ### Phase 5 — Offensive Security MCP Marketplace (v1.0)
78
+ ## What gets checked
885
79
 
886
- > A curated registry of offensive security MCP servers, each with scope enforcement metadata.
80
+ The proxy checks MCP `tools/call` arguments it can inspect. It blocks unknown target-bearing arguments, out-of-scope targets, explicit exclusions, restricted techniques, expired engagement windows, and free-form commands by default. DNS names authorized through IP ranges must resolve entirely inside the allowed ranges. Local JSONL auditing is always on; cloud logging is optional.
887
81
 
888
- - [ ] **Server registry** — searchable catalog of offensive security MCP servers (recon, exploitation, post-exploitation, reporting)
889
- - [ ] **Scope profiles** — each server publishes a scope profile declaring what targets/techniques it can affect
890
- - [ ] **One-click install** — install and configure MCP servers with automatic scope proxy wrapping
891
- - [ ] **Compatibility matrix** — which servers work with which AI agents (Claude, GPT, local LLMs)
892
- - [ ] **Community submissions** — submit and review MCP servers with quality ratings and security audits
893
- - [ ] **Technique taxonomy** — standardized technique categories (aligned with MITRE ATT&CK) for cross-server filtering
894
- - [ ] **Composite workflows** — chain multiple MCP servers into multi-stage attack workflows with per-stage scope constraints
895
- - [ ] **Sandboxed preview** — try MCP servers against a built-in vulnerable target before deploying
896
- - [ ] **License and compliance metadata** — track licensing, data handling, and compliance requirements per server
897
- - [ ] **Version management** — pin server versions, get update notifications, and review changelogs
82
+ The proxy cannot control destinations selected inside an upstream tool, HTTP redirects, targets read from files or encoded payloads, DNS changes after validation, or traffic that bypasses MCP. Use network egress controls and review each upstream tool's schema before relying on the proxy for an engagement. [Security model](docs/security.md).
898
83
 
899
- ### Phase 6 — Enterprise & Ecosystem (v1.x)
84
+ ## Install and release options
900
85
 
901
- - [ ] **SSO/OIDC integration** — enterprise authentication for the GUI and API
902
- - [ ] **Centralized policy server** — manage scope manifests across multiple proxies from a single control plane
903
- - [ ] **SIEM integration** — forward audit logs to Splunk, Elastic, Sentinel, etc.
904
- - [ ] **Compliance reporting** — automated reports for PCI-DSS, SOC 2, ISO 27001, and CREST engagement evidence
905
- - [ ] **Agent behavior analytics** — ML-based detection of anomalous agent behavior (target drift, technique escalation)
906
- - [ ] **Multi-agent support** — scope enforcement across multiple concurrent AI agents with shared state
907
- - [ ] **Engagement templates** — pre-built scope manifests for common engagement types (web app, internal network, cloud, API)
908
- - [ ] **SDK / library mode** — import scope validation as a library into custom agent frameworks without running a proxy
909
- - [ ] **CI/CD integration** — validate scope manifests in CI pipelines, run automated scope compliance checks
86
+ | Option | Command or image |
87
+ | --- | --- |
88
+ | Global npm install | `npm install -g @integsec/agentic-pentest-proxy` |
89
+ | Project install | `npm install @integsec/agentic-pentest-proxy` |
90
+ | GHCR image | `ghcr.io/integsec/agentic-pentest-proxy:latest` |
91
+ | Docker Hub image | `integsec/agentic-pentest-mcp-proxy:latest` |
910
92
 
911
- ### Future Explorations
93
+ The npm package includes the proxy, manifest builder, setup helper, and TUI executables. To see the optional install welcome banner, add `--foreground-scripts`; npm hides package install-script output by default. You can always run `integsec-agentic-pentest-proxy --help` for the same next steps. The welcome script does not access the network or modify files.
912
94
 
913
- - **MCP-native protocol extensions** — propose scope enforcement as a first-class MCP protocol feature
914
- - **Hardware security module (HSM) support** — store manifest signing keys in HSMs
915
- - **Air-gapped mode** — offline operation with pre-loaded manifests and local-only audit
916
- - **Agent scoring** — track per-agent compliance rates and generate trust scores over time
95
+ Google Cloud logging and Secret Manager SDKs are opt-in to keep the default install lean and free of their deprecated transitive package. If you use either GCP backend, install the SDKs alongside the proxy:
917
96
 
918
- ---
97
+ ```bash
98
+ npm install -g @integsec/agentic-pentest-proxy @google-cloud/logging @google-cloud/secret-manager
99
+ ```
919
100
 
920
- ## About IntegSec
101
+ AWS and Azure SDKs are included as optional dependencies. See [configuration and cloud setup](docs/configuration.md) for the required environment variables and Docker notes.
102
+ If you use GCP and are upgrading from 0.2.6, install the GCP SDKs before restarting the proxy; it now reports a missing Cloud Logging SDK at startup.
921
103
 
922
- **[IntegSec](https://integsec.com)** delivers human-expert-led agentic penetration testing for modern organizations moving at AI speed. We combine seasoned offensive security professionals with autonomous AI agents to find real vulnerabilities — not just scan results.
104
+ ## Troubleshooting
923
105
 
924
- ### Our Services
106
+ | Symptom | Check |
107
+ | --- | --- |
108
+ | Tool does not appear in your MCP client | Paste the generated entry inside one `mcpServers` object, restart the client, and confirm the client can run `integsec-agentic-pentest-proxy`. |
109
+ | TUI shows no decisions | Start a tool call, then use the exact audit path printed by setup. The TUI and client may have different working directories. |
110
+ | Call is blocked | Check the decision and reason in the TUI or audit JSONL. Confirm the target, exclusions, technique, and window in your manifest. |
111
+ | GCP backend says its SDK is missing | Install the two GCP packages shown above alongside the proxy. |
112
+ | Need all CLI options | Run `integsec-agentic-pentest-proxy --help`, `integsec-agentic-pentest-setup --help`, `integsec-agentic-pentest-manifest --help`, or `integsec-agentic-pentest-tui --help`. |
925
113
 
926
- - **[Pentest as a Service (PTaaS)](https://integsec.com/become-unbreachable)** — continuous human-led penetration testing for web apps, networks, APIs, and cloud environments
927
- - **[Adversary Simulation & Red Teaming](https://integsec.com/redteaming)** — real-world attack simulations to evaluate your security posture
928
- - **LLM Red Teaming** — security testing for AI/LLM applications
929
- - **OWASP Reviews** — structured assessments aligned with OWASP Testing Guides
930
- - **Offensive Cybersecurity Training** — level up your team's security skills
931
-
932
- ### TurboPentest
933
-
934
- **[TurboPentest](https://turbopentest.com)** is our agentic penetration testing platform. Paladin AI agents powered by Claude orchestrate 15 professional security tools — Nmap, OWASP ZAP, Nuclei, Nikto, Subfinder, FFUF, OpenVAS, Semgrep, and more — to deliver comprehensive security assessments in under 4 hours.
114
+ ## Reference
935
115
 
936
- - OWASP Top 10 coverage with validated exploits, not just potential findings
937
- - Black box and white box testing with GitHub integration
938
- - Blockchain-attested reports (SHA-256 hashed, anchored to Base L2)
939
- - CI/CD, VS Code, and Burp Suite Pro integrations
940
- - **Starting at $99/domain** — [try it now](https://turbopentest.com)
941
-
942
- > **Need human expertise + AI speed?** [Contact IntegSec](https://integsec.com) for expert-led pentesting backed by the same AI agents that power TurboPentest.
943
-
944
- ---
116
+ - [Configuration and manifest fields](docs/configuration.md)
117
+ - [Client integrations, HTTP, and Docker](docs/integrations.md)
118
+ - [TUI usage and screenshots](docs/tui.md)
119
+ - [Security model and limitations](docs/security.md)
120
+ - [Contributing and development](docs/development.md)
945
121
 
946
122
  ## License
947
123
 
948
- Apache 2.0 License. See [LICENSE](LICENSE) for details.
949
-
950
- ---
951
-
952
- Built by **[IntegSec](https://integsec.com)** | **[TurboPentest](https://turbopentest.com)** | [GitHub](https://github.com/integsec) | [Twitter](https://x.com/integ_sec)
124
+ Apache-2.0. See [LICENSE](LICENSE).