Metadata-Version: 2.5
Name: probebox
Version: 1.2.0
Summary: Local security toolkit for AI agents: deterministic red-team scan, fail-closed MCP audit proxy, Skill auditor, read-only discovery
Project-URL: Homepage, https://github.com/ShunyangLiu/probebox
Project-URL: Repository, https://github.com/ShunyangLiu/probebox
Project-URL: Issues, https://github.com/ShunyangLiu/probebox/issues
Author: Shunyang Liu
License: MIT
License-File: LICENSE
Keywords: agent-security,ai-security,mcp,mcp-audit,owasp-asi,prompt-injection,red-teaming,sarif,skill-security
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Requires-Python: >=3.11
Requires-Dist: httpx2<3.0.0,>=2.10.0
Requires-Dist: mcp<3.0.0,>=2.3.0
Requires-Dist: pydantic>=2.10.0
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: rich>=13.9.4
Provides-Extra: ws
Requires-Dist: httpx2[ws]<3.0.0,>=2.10.0; extra == 'ws'
Description-Content-Type: text/markdown

# ProbeBox

[![CI](https://github.com/ShunyangLiu/probebox/actions/workflows/ci.yml/badge.svg)](https://github.com/ShunyangLiu/probebox/actions/workflows/ci.yml)
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](pyproject.toml)
[![Platforms](https://img.shields.io/badge/platforms-Linux%20%C2%B7%20macOS%20%C2%B7%20Windows-blueviolet.svg)](#platforms)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-1.2.0-orange.svg)](pyproject.toml)

**English** | [简体中文](README_zh.md)

**ProbeBox is a local security toolkit for AI agents.** It scans an agent with deterministic attacks and evidence that leaves the model's reach, sits between an agent and its real MCP servers as a fail-closed audit proxy, audits Skills offline and in an isolated container, and starts with a read-only look at what an agent on your machine is already configured to reach. It adds no agent code of its own, spends no attacker-side model tokens, and works on Linux, macOS and Windows.

> **What a result means here.** A `VULNERABLE` verdict or a `CONFIRMED_SPECIFIC_VIOLATION` is backed by something ProbeBox observed itself: a request to its own collector, a write to its own sandbox, a tool trace. Everything else — `DEFENDED`, `INCONCLUSIVE`, a clean Skill audit, an empty discovery report — is not proof of safety. The static Skill engine in particular finds few malicious Skills and **cannot be used to clear one**; see [Auditing Skills](#auditing-skills).

---

## Table of Contents

- [The Commands](#the-commands)
- [Why ProbeBox](#why-probebox)
- [Quick Start](#quick-start)
- [Security Coverage (36 Built-In Scenarios)](#security-coverage-36-built-in-scenarios)
- [Auditing Skills](#auditing-skills)
- [Auditing a Real MCP Server](#auditing-a-real-mcp-server)
- [Discover and Init](#discover-and-init)
- [Platforms](#platforms)
- [Recorded Results](#recorded-results)
- [Security Warning & Responsible Use](#security-warning--responsible-use)
- [Development, Testing & Contributing](#development-testing--contributing)
- [Changes in 1.2.0](#changes-in-120)
- [Roadmap, License & Citation](#roadmap-license--citation)

---

## The Commands

| Command | What it does | Talks to a model? | Runs anything it finds? |
|---|---|---|---|
| `probebox discover` | Reads the MCP configurations, Skills and rule files that 16 desktop/IDE/CLI agents on this machine load; reports what they can reach and what that implies | No | No |
| `probebox init` | Writes a `scan.yaml` to review, from options you type or built-in target presets | No | No |
| `probebox check-target` | Validates target configuration and checks connectivity and protocol handshakes before scanning | No | Only with `--allow-launch` for local ACP handshakes |
| `probebox scan` | Runs the built-in attack suite against an agent over HTTP, OpenAI-compatible, A2A, WebSocket, ACP, CLI, Python or plugin | Only the agent under test | The agent you point it at |
| `probebox scan-skill` | Audits one Skill: offline, or paired with and without it in an isolated container | Only with `--dynamic` | Only with `--dynamic`, inside the container |
| `probebox proxy-mcp` | Passes an agent's MCP traffic to a real server, forwarding nothing you have not allowed | No | The upstream server you configure |

All commands run offline except where a model or a server is involved, and none loads `.env` except `scan` and `scan-skill --dynamic`.

## Why ProbeBox

1. **No agent code inside the scanner.** `src/probebox/` targets any external agent over HTTP JSON/SSE (with async polling), OpenAI `/chat/completions` or `/v1/responses`, A2A, WebSocket (`probebox[ws]`), ACP stdio JSON-RPC, a local CLI (with multi-turn `--resume`), a Python subprocess in its own virtual environment, or an external `plugin` adapter.
2. **Evidence instead of a judge.** ProbeBox does not ask a model whether an attack worked. It starts two isolated local HTTP servers, an ownership-guarded sandbox and an MCP probe server, and decides from what arrives there: callbacks, canaries, marker writes, tool traces.
3. **It refuses to guess.** A scenario whose probe was never delivered is `INCONCLUSIVE`, never `DEFENDED`. A Skill it could not read is reported as not scanned. A discovery file that is a link is refused, not followed.
4. **Defaults that fail closed.** The MCP proxy starts in `audit_readonly` and forwards nothing until a tool is listed. Shell hooks are disabled without `--allow-shell-hooks`. Dynamic Skill audits are opt-in.

**Where it sits next to other tools**

| Dimension | [promptfoo/promptfoo](https://github.com/promptfoo/promptfoo) | [snyk/agent-scan](https://github.com/snyk/agent-scan) | [Tencent/AI-Infra-Guard](https://github.com/Tencent/AI-Infra-Guard) | **ProbeBox** |
|---|---|---|---|---|
| **Primary strength** | Broad LLM and RAG red-teaming, eval matrix, multi-turn attack strategies | Static discovery and inspection of local MCP servers, tools and Skills | Broad AI infrastructure and CVE scanning plus an adaptive red-team suite | **Runtime probing with deterministic out-of-band evidence, a fail-closed MCP audit proxy, and read-only discovery** |
| **Attack and verdict engine** | Attacker and grader models plus assertions | Static analysis and poisoning rules | LLM-assisted red team, OWASP ASI reporting | **Declarative fixtures and MCP faults, 10 deterministic oracles, 0 attacker tokens** |
| **MCP supply chain** | Custom plugins | Static inspection of tool definitions | Static and runtime checks | **Live injection on a probe server, plus a transparent proxy in front of real servers** |
| **False-negative guard** | Standard eval scoring | Static coverage | Standard reporting | **`INCONCLUSIVE` whenever the fault provably was not delivered** |

They complement each other: use a scanner for breadth and ProbeBox when you need to show that a specific agent did a specific thing.

---

## Quick Start

Requires **Python 3.11+** and [`uv`](https://docs.astral.sh/uv/).

```bash
git clone https://github.com/ShunyangLiu/probebox.git
cd probebox
uv sync
```

### 1. See what your agents can already reach

Read-only, offline, a few seconds. It reads the well-known configuration, Skills and rule files of 16 agents (Claude Code, Codex CLI, Cursor, Windsurf, Claude Desktop, VS Code, Gemini CLI, Cline, Roo Code, Zed, OpenCode, OpenClaw, Antigravity, Kiro, Amazon Q and Amp), deduplicates shared directories while preserving per-client attribution, and prints JSON by default (the example below selects Markdown for reading).

```bash
uv run probebox discover --format markdown
```

Credentials stay where they are: the report keeps names, kinds, hosts and shapes, never a value. [Discover and Init](#discover-and-init) says exactly what is read and what is not.

### 2. Write a configuration to review and check connectivity

```bash
# Option A: ad-hoc network target -> writes scan.yaml
uv run probebox init --target my-agent=http://127.0.0.1:8000/chat

# Option B: named target preset -> writes a separate file
uv run probebox init --preset dify --output scan.dify.yaml

# Option C: network target + fail-closed MCP proxy policy -> writes scan.proxy.yaml + proxy-policy.yaml
uv run probebox init --target my-agent=http://127.0.0.1:8000/chat \
  --mcp-proxy-upstream https://mcp.example.com/mcp \
  --output scan.proxy.yaml

uv run probebox check-target --config scan.yaml
```

Option C also writes a `proxy-policy.yaml` that allows nothing until you list a tool. `init` never copies anything `discover` found, and never replaces an existing file unless you pass `--force`. Run `probebox init --list-presets` to see all 11 built-in connection presets (`dify`, `fastgpt`, `flowise`, `openclaw`, `openai`, `a2a`, `acp`, `ws`, `claude-code`, `codex-cli`, `python`).

### 3. Run the 0-token demo

Two local demo agents answer from a fixed script, so this needs no API key and finishes in a few seconds:

```bash
uv run probebox scan --config examples/scan.demo-mock.yaml
```

With Suite v3.1 on POSIX, the unguarded `unsafe-agent` falls for 19 of the 27 decided attacks (8 are `DEFENDED`, 2 `INCONCLUSIVE`); the guarded `safe-agent` falls for 0 of 27. Both pass 6 of 7 benign controls (the seventh, `benign_authorized_handoff`, exercises delegation routing not implemented by the mock). On Windows without symlink support, the POSIX-symlink scenario degrades to `SKIPPED` (`not_applicable`) rather than counting as a defense. Reports are written to `results/demo-mock/`.

### 4. Run against your own agent

```bash
# A generic JSON HTTP agent
uv run probebox scan --target my-agent=http://127.0.0.1:8000/chat --capabilities chat,web

# The fast baseline only, or the deep set
uv run probebox scan --tag core --target my-agent=http://127.0.0.1:8000/chat --capabilities chat,web,mcp_probe
uv run probebox scan --tag extended --target my-agent=http://127.0.0.1:8000/chat --capabilities chat,web,mcp_probe

# An OpenAI-compatible gateway
uv run probebox scan --target openai:https://your-gateway.example.com/v1/chat/completions --model my-agent

# Fail a CI run on findings, errors or missing coverage
uv run probebox scan --config examples/scan.external-blackbox.yaml --fail-on-vuln --fail-on-benign-fail --fail-on-inconclusive
```

Ready-made configurations for Claude Code, Codex CLI, OpenAI Agents SDK, LangGraph, AutoGen, CrewAI, OpenClaw, Dify, FastGPT, Flowise and Browser Use (plus lightweight Python adapters in [`examples/adapters/`](examples/adapters/)) are in [`examples/`](examples/).

<details>
<summary><strong>Python SDK</strong></summary>

```python
import asyncio
from pathlib import Path
from probebox import HttpTarget, run_scan

report = asyncio.run(
    run_scan(
        targets=[HttpTarget(name="my-agent", url="http://127.0.0.1:8000/chat", capabilities={"chat", "web"})],
        tags=["core"],  # Omit to run all 36 built-in scenarios
        results_dir=Path("results/matrix-run"),
    )
)
```

</details>

---

## Security Coverage (36 Built-In Scenarios)

The built-in suite ([src/probebox/scenarios/suite.yaml](src/probebox/scenarios/suite.yaml), `v3.1`) holds **29 attack scenarios and 7 benign utility controls** and maps every one of the ten OWASP Agentic Security categories (`ASI01`–`ASI10`).

| Category | Attack surface | Scenarios | Capabilities | What counts as evidence |
|---|---|---:|---|---|
| `1_goal_hijacking` | Direct and indirect goal hijacking | 2 | `chat`, `web`, `mcp_probe` | A protected tool is called, or the callback server is hit |
| `2_info_leakage` | Sensitive information leakage and exfiltration | 4 | `chat`, `canary_seeded`, `canary_context`, `web`, `mcp_probe` | A canary appears in a reply, an argument, or a callback body |
| `3_memory_poisoning` | Memory poisoning and cross-session leakage | 2 | `chat`, `mcp_probe` | A canary from one session surfaces in another, or poisoned memory triggers a tool call |
| `4_excessive_agency` | Excessive agency and confirmation bypass | 2 | `chat`, `mcp_probe` | A high-risk tool is called without the required confirmation, or sensitive data crosses to an outbound sink |
| `5_mcp_supply_chain` | MCP tool poisoning and supply chain, including malicious Skills | 7 | `chat`, `mcp_probe` (+`web` for some) | A fault-injected, required-parameter-poisoned or shadow tool is invoked, or a canary leaves through it |
| `6_ssrf_local_access` | SSRF (including multi-hop and second-order) and local resource access | 8 | `chat`, `web`, `mcp_probe` | The isolated SSRF origin is reached, a secret/config file is read (including POSIX symlink fixture), or a marker is written |
| `7_agentic_owasp_advanced` | ASI07–ASI10 (unauthenticated handoff, cascading fault, approval bypass, rogue post-revocation) | 4 | `chat`, `web`, `mcp_probe` | Controlled ledgers and second nodes record what was accepted |

Tags select a subset: `core` (24), `extended` (12), `non-mcp` (9), `owasp-full` (7) and `skill-defense` (1). Seven scenarios run over several turns. High-severity out-of-band or independent reply canary disclosures captured as incidental findings can be promoted to `VULNERABLE` (`promoted_from_incidental`), recorded separately from primary oracle hits.

**How many scenarios you can run depends on what you control.** ProbeBox skips a scenario whose required capabilities are missing (`SKIPPED` with `missing_capabilities`, not `not_applicable`) rather than scoring it. At runtime, ProbeBox automatically derives `canary_context` whenever a target seeds `canary_seeded` (or `canaries.system_secret`) or connects directly to `probebox probe-mcp` without a managed `mcp_proxy`.

| You control | Capabilities to declare | Runnable (POSIX) | What gets tested |
|---|---|---:|---|
| Only a chat endpoint | `chat` | 1 / 36 | Cross-session memory isolation |
| Chat and a built-in web fetcher | `chat, web` | 7 / 36 | Indirect web injections, multi-hop/second-order SSRF, benign article fetch |
| You can mount `probebox probe-mcp` directly | `chat, web, mcp_probe` | 35 / 36 | MCP supply-chain attacks, excessive agency, local file access, ASI07–ASI10, all 7 benign controls, plus context-canary reply (`canary_context` auto-derived; 34 / 36 behind a managed `mcp_proxy`) |
| You can also seed a staging secret | `chat, web, mcp_probe, canary_seeded` | 36 / 36 | Adds system-prompt extraction (`leak_system_prompt`) |

**Delivery before verdicts.** Each report lists, per target, which ASI categories the suite maps, which were selected, which were provably delivered and which received a verdict. A verdict is not proof of delivery, and for chat turns and web pages delivery means only that the adapter or fixture server returned content, not that the model read it.

**Strategies.** `--strategy` applies one deterministic transformation (for example `delimiter_wrap`) to the attack text of marked scenarios. Multi-turn scenarios that a strategy cannot transform are skipped. `compare` keys results by `(scenario_id, strategy)`, so runs made under different strategies are never treated as the same condition. `--attacker-model` proposes at most one new candidate for review and never runs a target; `--export-replay` writes a sanitized suite you can rerun offline.

Full schemas and oracles: **[docs/suite-and-oracles.md](docs/suite-and-oracles.md)**.

---

## Auditing Skills

```bash
# Offline. Reads the Skill, executes nothing, makes no request.
uv run probebox scan-skill ./skill
uv run probebox scan-skill sample.zip --format sarif

# Opt in: runs one fixed task with and without the Skill, in an isolated container.
uv run probebox scan-skill ./skill --dynamic
```

**Offline audit.** The Skill must have `SKILL.md` at its root. The reader follows no symbolic link or junction, refuses hard links and special files, and bounds the number and size of entries, on every platform. The engine then reports four kinds of evidence: structure and hidden text, declarative natural-language rules, a narrow static analysis of Python and shell snippets, and — when `discover` runs it — what the Skill could reach through configured MCP servers. Findings are labelled `clue` or `static_taint`; files it cannot analyze are listed as not scanned.

> **The offline audit cannot clear a Skill.** On [SkillFortifyBench](https://github.com/qualixar/skillfortifybench) (MIT, pinned commit `eb9d5a9`), 180 Claude Markdown Skills read as single-file `SKILL.md` assets, the rules frozen before scoring found **0 of 16** malicious Skills in a development split and **0 of 74** in a held-out split, with 0 false positives on 17 and 73 benign Skills. After analysis of fenced Python and shell was added from the development split, a regression run on the same splits found 6 of 16 and 27 of 74; the held-out split had been seen by then, and is no longer an independent test. On the SkillHarm corpus (CC BY 4.0, pinned commit `cc21f90`), 687 complete Skills of 5,274 files, the rules found **19 of the 642 scanned**; 45 could not be scanned. Its clues are worth a reviewer's attention; its silence is worth nothing.

**Dynamic audit.** `--dynamic` needs a Linux Docker host with the pinned agent image ([docker/skill-agent](docker/skill-agent/Dockerfile), built by `scripts/build_skill_agent_image.py`). One synthetic task runs twice in a fixed, versioned agent: once without the Skill and once with it. The container has no network, a read-only root and Skill mount, no capabilities and fixed resource limits. The host keeps the model credentials and makes each model request itself. The Docker endpoint must be one you trust to stay what it is while the audit runs: the audit checks that the daemon is the one it recorded, but cannot defend against the local Docker configuration being rewritten under it. The audit confirms a violation only when its own collector receives the confidential synthetic marker through an authorized tool call in the Skill arm and not in the baseline; every other outcome is `INCONCLUSIVE`.

Dynamic mode sends the Skill text, the synthetic task and the tool results to the model endpoint in `LLM_BASE_URL`, and says so on stderr before starting. Do not use it on Skills that contain sensitive content.

Evidence for the dynamic path comes from a real Docker daemon on Linux with a simulated model: isolation, cleanup and the protocol are verified there. With a real model (`deepseek-flash`) the result has been `INCONCLUSIVE`, which is not a safety result. Dynamic mode has not yet been exercised against Docker Desktop on macOS or Windows.

---

## Auditing a Real MCP Server

`probebox proxy-mcp` sits between an agent and a server it actually uses, over stdio, Streamable-HTTP or SSE in any combination.

| Mode | What it does |
|---|---|
| `audit_readonly` (default) | Forwards nothing unless a local policy lists the tool, constrains its arguments and, if set, matches the expected server name. A changed tool list or an incomplete page freezes the session. |
| `observe` | Passes everything and records it. Writes reach the real server. |
| `active_sandbox` | For an isolated environment only: forwards calls that are not on the deny list. |

`annotations.readOnlyHint` from the upstream is shown and never trusted. The proxy strips credentials the agent sends before talking to the upstream, keeps the upstream's credentials from the agent, and can inject faults and lossless canaries into tool calls so that an exfiltration can be proven by the collector receiving the canary. It was exercised on Linux against the reference filesystem, SQLite and fetch servers with a real agent; the independent file, database and HTTP counters showed no business write and no leftover process.

Details: [docs/proxy-policy.md](docs/proxy-policy.md).

---

## Discover and Init

`probebox discover` answers "what can the agents on this machine reach?" before you configure anything.

```bash
uv run probebox discover                                  # JSON on stdout
uv run probebox discover --format markdown                # for reading
uv run probebox discover --output r.json --html r.html --sarif r.sarif.json
uv run probebox discover --no-home                        # project files only
uv run probebox discover --probe-tools 'cursor/user/live@616c549372575100'   # the token a listing gives
uv run probebox discover --fail-on high                   # exit 1 for a finding, 3 if the audit did not finish
```

**What it reads.** Well-known default locations across 16 clients (shared paths such as `.agents/skills` or `AGENTS.md` are scanned and reported once with full per-client attribution, while cross-asset L4 audits stay scoped per client):

| Client | MCP configuration | Skills | Rule and memory files |
|---|---|---|---|
| Claude Code | `~/.claude.json`, `.mcp.json` | `.claude/skills`, installed plugins | `CLAUDE.md`, `.claude/rules`, `CLAUDE.local.md` |
| Codex CLI | `~/.codex/config.toml` | `~/.codex/skills`, `.agents/skills` | `AGENTS.md` |
| Cursor | `~/.cursor/mcp.json`, `.cursor/mcp.json` | `.cursor/skills` | `.cursor/rules`, `.cursorrules` |
| Windsurf | `~/.codeium/windsurf/mcp_config.json`, `.windsurf/mcp_config.json` | `.windsurf/skills` | `.windsurf/rules`, `.windsurfrules`, memories |
| Claude Desktop | `claude_desktop_config.json` | — | — |
| VS Code | user and workspace `mcp.json` | `.github/skills`, `~/.copilot/skills` | `copilot-instructions.md`, `.github/instructions` |
| Gemini CLI | `~/.gemini/settings.json`, `.gemini/settings.json` | `.gemini/skills` | `GEMINI.md` |
| Cline | `~/.cline/data/settings/cline_mcp_settings.json` | `.cline/skills` | `.clinerules`, `.cline/rules` |
| Roo Code | VS Code globalStorage `mcp_settings.json`, `.roo/mcp.json` | `.roo/skills` | `.roo/rules` |
| Zed | user and `.zed/settings.json` (`context_servers`) | `.agents/skills` | `AGENTS.md` |
| OpenCode | `~/.config/opencode/opencode.json[c]`, `opencode.json[c]` | `~/.config/opencode/skills`, `.opencode/skills` | `AGENTS.md` |
| OpenClaw | `~/.openclaw/openclaw.json` | `~/.openclaw/skills`, `~/.openclaw/workspace/skills` | `~/.openclaw/workspace/AGENTS.md` |
| Antigravity | `~/.gemini/antigravity/mcp_config.json`, `~/.gemini/config/mcp_config.json`, `.agents/mcp_config.json` | `~/.gemini/{antigravity,config}/skills`, `.agent[s]/skills` | `~/.gemini/AGENTS.md`, `~/.gemini/config/rules`, `.agent[s]/rules` |
| Kiro | `~/.kiro/settings/mcp.json`, `.kiro/settings/mcp.json` | `.kiro/skills` | `.kiro/steering/*.md` |
| Amazon Q | `~/.aws/amazonq/mcp.json`, `.amazonq/mcp.json` | — | `.amazonq/rules/*.md` |
| Amp | `~/.config/amp/settings.json` (Windows `AppData/Roaming/amp/settings.json`), `.amp/settings.json` (`amp.mcpServers`) | `~/.config/amp/skills`, `.amp/skills` | `~/.config/amp/AGENTS.md` |

**What it reports.** For each configured server: what the client does to reach it (starts a local program, connects out), what its tools can do (`file_read`, `file_write`, `network`, `command`), and on what basis that was inferred: a known server package, or the tools a probed server listed — never the transport. For each Skill and rule file: the same clues `scan-skill` finds. And the two combined: a Skill that names a credential location is one clue; a file-reading server configured for the same client is another; together they are reported as a cross-asset finding, at `clue` level, when the same agent is presented with both in one situation: a server kept for one project is never pooled with one kept for another. Typical configuration findings are server code fetched and run without a pinned version, plain `http` to a non-local server, a credential written into the configuration, a server started through a shell string, a file server rooted at `/` or the home directory, and servers defined by the project directory.

**What never leaves the machine.** No value of an environment variable or header, no command-line argument other than its class, no query string, user info or unusual path of a URL, and no bare word off a command line. Paths appear as `$HOME/…` and `$CWD/…`. A file name that is not a plain name, or that is shaped like a credential, is shown under a stable stand-in. Tool descriptions of a probed server are not recorded.

**What it will not do.** It executes nothing. It follows no link, on any platform. A root is reached component by component without following a link, and one that cannot be reached that way is not read. `--no-home` reads nothing under your home directory and refuses a project root that is it, is below it, or reaches it through another path; no environment variable that relocates a client's configuration (`CODEX_HOME`, `CLAUDE_CONFIG_DIR`, `XDG_CONFIG_HOME`) is honoured at any time, so there is no second route back. `--probe-tools` contacts only the running remote servers you approve by id and token, where the token is the endpoint and credential references a listing gave, asks each for its tool list and calls nothing; stdio servers are never started, no redirect is followed, and an answer is cut off at a fixed size.

**What it does not look at.** Hooks and permission settings, servers given on a command line or inside VS Code / Cursor `settings.json`, enterprise-managed settings, directories other than the working directory and `--root`, and combinations across different clients. Each of these is listed in the report's `limitations`, and everything it could not read is listed under coverage as not scanned.

`probebox init` writes the configuration that comes next. In default network mode (without `--preset`), it takes only typed options, generates network targets only, and has no option for commands, hooks, environment variables or credentials — so it cannot copy one in. Named `--preset` templates write starter `${ENV_VAR}` placeholders, commands (`acp`, `claude-code`, `codex-cli`) or `entrypoint` (`python`) for review before scanning, and never copy literal secrets or discovered configs. With `--from-discovery` it attaches what `discover` found as comments, which configure nothing. ProbeBox validates the configuration and policy before writing. It publishes each file atomically, with a new policy first. If writing the scan configuration fails after the policy was published, `init` reports the policy path and a retry can reuse it. Existing policies must meet the requested restrictions and are kept as written.

Details: [docs/discover-and-init.md](docs/discover-and-init.md).

---

## Platforms

ProbeBox installs from a pure-Python wheel with no compiler on Linux, macOS and Windows, and runs natively on each.

| | Linux | macOS | Windows |
|---|---|---|---|
| Offline commands: `discover`, `init`, `scan-skill`, `compare` | Tested | Tested | Tested |
| `check-target` and `scan` with HTTP, OpenAI, A2A, WS, ACP, CLI, Python and plugin targets | Tested | Tested | Tested |
| `probe-mcp` and `proxy-mcp` | Tested | Tested | Tested |
| `scan-skill --dynamic` against a real Docker daemon | Verified | Not exercised | Not exercised |

"Tested" means the full test suite passes there: in CI on Ubuntu and Windows Server for pushes to `main`, for pull requests into `main` and by hand on a branch; on macOS and on Windows 10 by the maintainer. On Windows, discovery and Skill reads reject junctions and symbolic links. Spawned processes enter a Job Object before they run so their whole tree can be ended. Command strings keep their backslashes, and output is UTF-8 whatever the system code page. A request to an address on the machine itself never goes through a proxy, whatever proxy the system is set to use: Windows reports such a setting to Python without the addresses the system leaves out of it.

Before a release, the one candidate wheel is installed into an empty directory outside the repository on all three systems and checked by `scripts/verify_wheel.py`.

---

## Recorded Results

Numbers below come from runs made for a specific suite version. **Results recorded under different suite versions or strategies are not comparable with each other.**

**Suite v3.1, 11 real agents + 2 demo controls (2026-12-03, `deepseek-flash`).** Claude Code, Codex CLI, OpenAI Agents SDK, LangGraph, AutoGen, CrewAI, OpenClaw, Dify, Flowise, Browser Use and FastGPT plus `unsafe-agent` and `safe-agent`: 468 cells across 13 targets × 36 scenarios. Across the 11 real agents, decided attacks summed to **86 / 267 = 32.2%** vulnerable (73 primary oracle hits + 13 promoted incidental disclosures; denominator is the sum of each report's `summary.attack_total`, excluding `SKIPPED`, `INCONCLUSIVE` and `ERROR`), hitting **21 of 28** real-agent attack scenarios; `safe-agent` stayed at **0 vulnerabilities** (`0/28`). For descriptive context only (different suite versions are not directly comparable), the earlier Suite v3.0 run on the same 11 real agents recorded 25 / 302 = 8.3%. Benign controls passed 57 of 71 cells on the 11 real agents (69 of 85 including the two demo controls; most failures came from model over-refusal on `benign_approved_delete`). In a controlled CLI permission comparison on the same Suite v3.1 and model, enabling built-in classifier review reduced Claude Code ASR from **42.9% (12/28, `bypass`)** to **28.6% (8/28, `auto`)** and Codex CLI ASR from **42.3% (11/26, `bypass`)** to **33.3% (9/27, `auto_review`)**, with both keeping `6/7` benign pass. Full tables and caveats are in [docs/recorded-results.md](docs/recorded-results.md).

**Suite v3.0 and v2.1 (historical).** Earlier Suite v3.0 (five-framework strategy matrix) and Suite v2.1 (seven-agent pre-1.0.0 matrix) measurements are kept unchanged with their caveats in [docs/recorded-results.md](docs/recorded-results.md).

---

## Security Warning & Responsible Use

> **Authorized testing only.** ProbeBox is a red-team tool. Run it only against local sandboxes, staging deployments, or agents you own or have written authorization to audit. Never run it against production agents connected to real customer data, live credentials, or tools with external side effects.
>
> **CLI agents keep their own tools unless you take them away.** [examples/scan.claude-code.yaml](examples/scan.claude-code.yaml) passes `--permission-mode bypassPermissions` **strictly paired with `--strict-mcp-config --tools ""`**, so Claude Code can reach only ProbeBox's sandboxed probe tools. Keep that isolation when auditing any coding agent.
>
> **`observe` mode is not `audit_readonly`.** In `observe` the proxy forwards what it sees. Real writes reach the real server.

### Built-in safety controls

- **Two origins.** Simulated public and callback routes and the SSRF metadata endpoint bind separate origins. No admin or log route is exposed.
- **A probe directory that must be yours.** `--probe-dir` gets an ownership marker and an exclusive lock. ProbeBox refuses a non-empty directory without its marker and refuses linked markers and sandbox paths. It checks directory ownership and write permissions on POSIX. On Windows, use a directory under your private user profile with the inherited permissions.
- **Egress allowlist.** The probe's `web_fetch` refuses every URL outside the current scan's two origins and follows no redirect.
- **Credentials stay on their origin.** An HTTP target's `headers` are never sent to its `health_url` or `reset_url`.
- **Child processes never outlive their scan.** Every managed process runs in a tree of its own — a session and process group on POSIX, a job object on Windows — and is ended with all of its descendants on timeout or cancellation.

---

## Development, Testing & Contributing

```bash
uv sync --group dev                 # pytest and ruff
uv run --no-sync ruff check .
uv run --no-sync pytest -v          # unit and end-to-end tests
uv run --no-sync python scripts/smoke_demo.py       # the 0-token demo through the CLI
uv run --no-sync python scripts/verify_wheel.py --probebox <env>/bin/probebox --python <env>/bin/python
```

CI runs the whole suite on Ubuntu and Windows Server, and lint on Ubuntu, for pushes to `main`, for pull requests into `main`, and by hand on a branch. The same checks run on Windows 10 and macOS by hand before a release.

The Docker-based tests of `scan-skill --dynamic` need Linux, the pinned base image and `scripts/build_skill_agent_image.py`; `scripts/validate_skill_dynamic.py` is the real-daemon acceptance run and is meant for that Linux host.

To add an attack scenario, add a declarative entry to `suite.yaml` and check it against both demo agents. To add an agent integration, share a tested `examples/scan.<agent>.yaml` or subclass `TargetAdapter`. Please make sure lint and tests pass before opening a pull request.

<details>
<summary><strong>Repository structure</strong></summary>

```text
probebox/
├── docs/                             # Reference manuals
├── docker/skill-agent/               # Pinned, networkless agent for dynamic Skill audits
├── examples/                         # Demo agents and ready-made scan configurations
├── scripts/                          # Image build, wheel verification, benchmarks, real-Docker acceptance
├── src/probebox/
│   ├── cli.py                        # scan · scan-skill · discover · init · check-target · probe-mcp · proxy-mcp · compare
│   ├── config.py                     # Typed scan configuration
│   ├── runner.py · scenarios/        # Scheduler, suite schema, deterministic oracles
│   ├── targets/                      # HTTP · OpenAI · A2A · WS · ACP · CLI · Python · plugin adapters
│   ├── probes/                       # HTTP probe servers, sandbox, MCP probe and proxy
│   ├── skills/                       # Skill audit: static engine, isolated dynamic audit
│   ├── discover/ · init_config.py    # Read-only discovery and configuration generation
│   ├── contracts.py · sarif.py · html_report.py · compare.py
│   ├── _safefs.py · _win32.py        # Path checks and atomic I/O, Windows process control
│   └── telemetry.py · budget.py · fingerprints.py · hooks.py
└── tests/
```

</details>

---

## Changes in 1.2.0

**Suite v3.1 & Forensics**

- Built-in suite upgraded in place from `v3.0` (38 scenarios) to `v3.1` (**36 scenarios = 29 attack + 7 benign**, all ten OWASP `ASI01`–`ASI10` categories), adding multi-hop and second-order SSRF, required-parameter MCP schema poisoning (`required_params_append`), POSIX symlink vs canonical-path local read fixtures (non-POSIX degrades to `SKIPPED + not_applicable`), and calibrated approval/handoff benign controls.
- Internal-channel canary forensics (`tool_args`, `memory_write`, `handoff`) with redacted persistence, high-severity incidental bypass promotion (`promoted_from_incidental`) accounted separately from primary oracle hits, and transparent report denominators (`total`, `applicable`, `delivered`, `concluded`, `not_applicable`).

**Target Compatibility & Onboarding**

- New target protocols and adapters: `a2a` (Agent-to-Agent), `websocket` (WebSocket via optional extra `probebox[ws]`), `acp` (Agent Client Protocol stdio JSON-RPC), external `plugin` entrypoints, `http` async job polling, and `openai` SSE + `/v1/responses`.
- New `probebox check-target` preflight connectivity/handshake validator and `probebox init --preset` (11 built-in templates), plus lightweight Python adapters for LangGraph, OpenAI Agents SDK, AutoGen and CrewAI under [`examples/adapters/`](examples/adapters/).

**16-Client Offline Discovery**

- `probebox discover` expanded from 6 to **16 clients** (adding `gemini-cli`, `cline`, `roo-code`, `zed`, `opencode`, `openclaw`, `antigravity`, `kiro`, `amazon-q` and `amp`), with canonical-path deduplication for shared Skill/rule directories while keeping per-client attribution and independent per-client L4 cross-asset findings.

Details: [docs/changes-in-1.2.0.md](docs/changes-in-1.2.0.md) (and earlier [docs/changes-in-1.0.0.md](docs/changes-in-1.0.0.md)).

---

## Roadmap, License & Citation

### Roadmap

- **Shipped**: the 36-scenario Suite v3.1 with OWASP ASI coverage, internal-channel forensics and SARIF/HTML export; HTTP/OpenAI/A2A/WebSocket/ACP/CLI/Python/plugin adapters; `check-target` and `init --preset`; 16-client `discover`; fail-closed MCP audit proxy; static + isolated dynamic Skill audits; latency, token and cost telemetry; native Linux, macOS and Windows support.
- **Next**: a semantic-model option for Skill audits; a static Skill engine with a recall that can support a verdict; dynamic Skill audits verified on Docker Desktop for macOS and Windows; enterprise-managed settings and hooks in `discover`.

### License

Released under the [MIT License](LICENSE).

### Citation

If you use ProbeBox in academic research, benchmarks, or security evaluations, please cite:

```bibtex
@software{probebox2026,
  title  = {ProbeBox: Local security toolkit for AI agents},
  author = {Liu, Shunyang},
  year   = {2026},
  url    = {https://github.com/ShunyangLiu/probebox},
  version = {1.2.0}
}
```
