# How are security tools integrated and executed?

> Open-source AI pentest and offensive-security agents — a good answer covers: Which tools the agent can call and how (shell wrappers, MCP servers, Kali/Docker sandboxes, browsers, custom scripts); how commands are built and how output is parsed and fed back to the model.

Canonical page: https://llms-technical-reviews.com/offensive-security-agents/q/tools/

## Verdict

Nebula, Pentest Swarm AI and RAPTOR have the most structured tool layers, where code knows each tool's target and parses its output. The rest hand the model a shell and differ in where it runs.

**Typed tools and adapters.** [Nebula](/p/nebula/) defines every capability as a `ToolSpec` with a risk class, target argument, schema and parser, and routes all calls through one `ToolBroker`. Its `run_command` runs in a Kali container with no network by default. [Pentest Swarm AI](/p/pentest-swarm-ai/) wraps 38 tools as Go adapters run as argv subprocesses (no shell), with JSONL output parsed into findings. [RAPTOR](/p/raptor/) runs Semgrep, CodeQL, fuzzers and binary tools as list-argument subprocesses with a sanitised environment inside namespace, Landlock and seccomp layers, and grades their output by evidence tier. [RedAmon](/p/redamon/) reaches its scanners, Metasploit and Playwright through five MCP servers in a Kali container. Arguments are raw strings with per-tool deadlines, and output returns verbatim to the model.

**Model-written shell in a container.** [Strix](/p/strix/) gives agents an SDK shell inside a Kali container whose HTTP traffic all passes through a Caido proxy, plus 43 base tools. Output over 8K tokens is spilled to a file. [PentAGI](/p/pentagi/) runs `terminal` through the Docker exec API (default timeout 1,200 s) and exposes specialist agents to the planner as tools. [Decepticon](/p/decepticon/) sends `bash` to a sandbox daemon that runs tmux sessions, returning up to 15K characters inline. [Shannon](/p/shannon/) uses the pi harness's `bash` and file tools, a Playwright skill for browser agents, and typed submit tools for each phase.

**Host shell or provider tools.** [CyberStrike](/p/cyberstrike/) parses commands with tree-sitter for permission rules, then spawns them in the host shell with the full environment. Its `http_replay` engine is the structured exception. [PentestAgent](/p/pentestagent/)'s `terminal` defaults to a host subprocess, and crew workers always run locally even with `--docker`. [PentestGPT](/p/pentestgpt/) registers no tools and passes Claude Code's or Codex's own tools with full access.

**Outlier.** [HexStrike AI](/p/hexstrike-ai/) is purely a tool server: about 150 MCP tools post to Flask routes that build command strings by concatenation and run them with `shell=True` on the host.

Pick: Nebula when every call must pass a typed policy check.
Pick: Pentest Swarm AI or RAPTOR for deterministic tool runs with parsed output.
Pick: Strix or Decepticon for a free-form shell kept inside a container.

## Per-project answers

### usestrix/strix (answered)

Strix agents have access to **~30 built-in tools** plus any registered via `register_agent_tools()` (`factory.py:698–714`). Tools fall into several categories:

**Shell and filesystem** — Every agent carries `Filesystem` and `Shell` SandboxAgent capabilities (`factory.py:813–828`) that provide native SDK tools (read/write files, `exec_command`, `write_stdin`). The `exec_command` tool is wrapped to enforce output caps via `_apply_shell_output_cap()` (lines 435–442), limit yield time, and annotate running-non-TTY processes. The `write_stdin` wrapper decodes escape sequences. Outputs are bounded at `STRIX_TOOL_OUTPUT_MAX_TOKENS` (8K tokens), `STRIX_TOOL_OUTPUT_MAX_LINES` (2000), and `STRIX_TOOL_OUTPUT_MAX_BYTES` (50 KB) via `_bound_result()` (lines 138–142). When tool output exceeds the bound, it is spilled to a workspace file via the spill writer (`runner.py:402–412`).

**Browser** — The `agent_browser` skill provides a CLI for automated browser interaction (Playwright-based).

**HTTP Proxy (Caido)** — The Docker sandbox runs `caido-cli` as an in-container sidecar. Environment variables `http_proxy`/`https_proxy` pointing at `127.0.0.1:48080` route all container traffic through Caido (`session_manager.py:317–330`). Tools like `list_requests`, `view_request`, `repeat_request`, `list_sitemap`, and `scope_rules` (`tools/proxy/tools.py`) give the agent access to captured HTTP traffic.

**MCP servers** — User-configured MCP servers (via `~/.strix/mcp-servers.json`) are registered in an `McpRegistry` (`runner.py:475–515`). Tools `list_mcps`, `describe_mcp`, `call_mcp`, `get_mcp_tool_schema`, and `search_mcp_tools` let the agent discover and invoke remote tools. Tool names are namespaced by connection name.

**Reporting and knowledge** — `create_vulnerability_report`, `create_dependency_report`, `update_vulnerability_report`, `delete_vulnerability_report`, `list_reports`, and `get_report` (`tools/reporting/tool.py`) for findings. Notes, todos, threat models, and coverage tools record structured knowledge. `web_search`/`web_get_contents` provide OSINT. `think` is a reasoning scaffold.

**Agent graph tools** — `create_agent`, `send_message_to_agent`, `wait_for_agents`, `stop_agent`, `view_agent_graph`, and `agent_finish` (`tools/agents_graph/tools.py`).

**Command building and output parsing** — Tool invocations are validated by Pydantic (`@function_tool` decorator), wrapped for argument coercion (`_with_coerced_arguments`), and strict-schema compliance (`_with_strictness`). Errors are returned as tool results, not exceptions, so the model can self-correct (`_function_tool_with_error_result`, lines 294–305).


Citations: [strix/agents/factory.py:633-677](https://github.com/usestrix/strix/blob/6b7ae2ebe4d47037a927aade23265ff4e4f27e84/strix/agents/factory.py#L633-L677) · [strix/agents/factory.py:138-162](https://github.com/usestrix/strix/blob/6b7ae2ebe4d47037a927aade23265ff4e4f27e84/strix/agents/factory.py#L138-L162) · [strix/runtime/session_manager.py:313-330](https://github.com/usestrix/strix/blob/6b7ae2ebe4d47037a927aade23265ff4e4f27e84/strix/runtime/session_manager.py#L313-L330) · [strix/core/runner.py:469-515](https://github.com/usestrix/strix/blob/6b7ae2ebe4d47037a927aade23265ff4e4f27e84/strix/core/runner.py#L469-L515) · [strix/tools/reporting/tool.py:981-1010](https://github.com/usestrix/strix/blob/6b7ae2ebe4d47037a927aade23265ff4e4f27e84/strix/tools/reporting/tool.py#L981-L1010) · [strix/tools/agents_graph/tools.py:1-30](https://github.com/usestrix/strix/blob/6b7ae2ebe4d47037a927aade23265ff4e4f27e84/strix/tools/agents_graph/tools.py#L1-L30)

### KeygraphHQ/shannon (answered)

Security tools are integrated through pi's **custom tool system** and the `tool` call mechanism from the pi-coding-agent harness. Every agent gets a standard set of built-in pi tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls` (`apps/worker/src/ai/pi/pi-executor.ts:60`). Three custom tools are added universally: `todo_write` (full-state-replace planning scratchpad for agent task tracking), `glob` (file pattern matching via zx's `globby`), and `task` (child-session delegation — spawns an independent sub-agent with its own tools for parallel sub-tasks, constrained to `CHILD_TOOLS = ['read', 'grep', 'find', 'ls', 'write', 'bash']` with no recursive task or collector tools) (`apps/worker/src/ai/pi/task-tool.ts:47`, `apps/worker/src/ai/pi/session-tools.ts:25-104`). Per-phase collector tools are injected by the activity: vulnerability agents get `submit_exploitation_queue` which captures structured findings via TypeBox validation (`apps/worker/src/ai/queue-schemas.ts:295-348`), plus `set_findings_summary`, `set_strategic_intelligence`, `set_safe_vectors`, and `set_blind_spots` for the analysis deliverable (`apps/worker/src/collectors/vuln-collector.ts:365-474`). Recon and pre-recon phases have their own collector tools with TypeBox schemas in their respective `apps/worker/src/collectors/` files. **Browser automation** is integrated for auth agents via the `playwright-cli` Skill (`apps/worker/src/ai/pi/pi-executor.ts:62-77`), injected only for browser-using agents (determined by `apps/worker/src/utils/browser-agents.ts`). Each agent is assigned to one of 6 isolated Playwright sessions via `PLAYWRIGHT_SESSION_MAPPING` to share browser state without interfering (`apps/worker/src/session-manager.ts:177-206`). **Bash commands** are bounded via a timeout extension (`BASH_TIMEOUT_EXTENSION_DIR`). Commands are built within the pi session environment; tools like `save-deliverable` and `generate-totp` are exposed as CLI scripts on the `PATH`. Output is parsed by the model as tool results, and structured payloads (exploitation queues, analysis sections) are captured via the collector tool's in-memory state before being written to disk by `AgentExecutionService`.


Citations: [apps/worker/src/ai/pi/pi-executor.ts:59-77](https://github.com/KeygraphHQ/shannon/blob/b9744f6cecc5429333873b86a6762f1d70c54fc2/apps/worker/src/ai/pi/pi-executor.ts#L59-L77) · [apps/worker/src/ai/pi/task-tool.ts:44-48](https://github.com/KeygraphHQ/shannon/blob/b9744f6cecc5429333873b86a6762f1d70c54fc2/apps/worker/src/ai/pi/task-tool.ts#L44-L48) · [apps/worker/src/ai/pi/session-tools.ts:25-104](https://github.com/KeygraphHQ/shannon/blob/b9744f6cecc5429333873b86a6762f1d70c54fc2/apps/worker/src/ai/pi/session-tools.ts#L25-L104) · [apps/worker/src/ai/queue-schemas.ts:294-348](https://github.com/KeygraphHQ/shannon/blob/b9744f6cecc5429333873b86a6762f1d70c54fc2/apps/worker/src/ai/queue-schemas.ts#L294-L348) · [apps/worker/src/collectors/vuln-collector.ts:364-474](https://github.com/KeygraphHQ/shannon/blob/b9744f6cecc5429333873b86a6762f1d70c54fc2/apps/worker/src/collectors/vuln-collector.ts#L364-L474) · [apps/worker/src/session-manager.ts:177-206](https://github.com/KeygraphHQ/shannon/blob/b9744f6cecc5429333873b86a6762f1d70c54fc2/apps/worker/src/session-manager.ts#L177-L206)

### vxcontrol/pentagi (answered)

Security tools are integrated as Docker-executed commands through a unified tool-calling layer, not as wrapper scripts on the host. The tool registry (`pkg/tools/registry.go:11-54`) defines 35+ tool names grouped into 7 types: Barrier (done, ask), Agent (pentester, coder, installer, searcher, memorist, adviser), Environment (terminal, file), SearchNetwork (browser, all search engines), and SearchVectorDb (search_in_memory, graphiti_search).

**Terminal and file access.** The `terminal` tool (`pkg/tools/terminal.go`) is the core environment interface. Commands execute inside Docker containers via the Docker exec API (`ContainerExecCreate`, line 228), not a host shell. The `SandboxCommand()` function wraps commands with a HUP-signal trap so they survive flow stops (`pkg/docker/flow_commands.go:21-24`). File read/write/edit use Docker's `CopyFromContainer`/`CopyToContainer` with tar streams (lines 433-560). All commands have configurable timeouts (default 1200s, max 3 hours, line 82-90).

**Search engines.** The `web_search` tool (`pkg/tools/web_search.go`) is the unified search orchestrator. It selects from 8 backends (Google, DuckDuckGo, Tavily, Firecrawl, Traversaal, Perplexity, Searxng, Sploitus) based on intent `mode`: `links`, `answer`, `research`, or `exploit`. Each mode has a `fallbackStrategy` fallback chain (lines 82-109). Sploitus is a dedicated exploit/offensive-tool search engine (line 105, registry line 268-276). The orchestrator retries retryable errors up to 2 times per engine and walks the chain on failure.

**Specialist agents as tools.** Agent tools (pentester, coder, installer, etc.) are not direct tool executions but calls to sub-agents. When the primary agent calls `pentester`, the executor spawns a `pentester` sub-agent with its own tool set including terminal, browser, web_search, and `hack_result` barrier — that sub-agent does the actual work and returns a synthesized result.

**External functions.** The system also supports user-defined external functions (`ExternalFunction` in `pkg/tools/tools.go:63-69`) registered via the API, which are called as HTTP APIs with JSON schemas.


Citations: [backend/pkg/tools/registry.go:11-54](https://github.com/vxcontrol/pentagi/blob/cffed9485aa1cca70762cd08a57ac62a80406258/backend/pkg/tools/registry.go#L11-L54) · [backend/pkg/tools/terminal.go:125-193](https://github.com/vxcontrol/pentagi/blob/cffed9485aa1cca70762cd08a57ac62a80406258/backend/pkg/tools/terminal.go#L125-L193) · [backend/pkg/tools/web_search.go:82-109](https://github.com/vxcontrol/pentagi/blob/cffed9485aa1cca70762cd08a57ac62a80406258/backend/pkg/tools/web_search.go#L82-L109) · [backend/pkg/docker/flow_commands.go:17-24](https://github.com/vxcontrol/pentagi/blob/cffed9485aa1cca70762cd08a57ac62a80406258/backend/pkg/docker/flow_commands.go#L17-L24)

### GreyDGL/PentestGPT (answered)

PentestGPT does **not** define its own security tools. Instead, both the Supervisor and Executor receive every tool exposed by the LLM provider (Claude Code or Codex) with `SandboxPolicy.FULL_ACCESS`. The provider supplies shell execution, file read/write, MCP servers, and any installed skill commands. The framework's `unified_agent` package provides a `ToolRegistry` (`tools.py:40`) for registering custom Python functions that are served to both backends via a shared stdio MCP server (`tool_server.py:1`), launched as `python -m unified_agent.tool_server pkg.mod:REGISTRY`. Both backends see the same tool as `mcp__<server>__<tool>`. However, the `pentestgpt_agent` product itself registers **zero custom tools** — it relies entirely on the provider's native capabilities. The Supervisor and Executor system prompts instruct the model to use shell commands bounded with path, timeout, and output limits (`agents.py:45-97`). The prompts explicitly warn that tool-call timeout metadata is not an OS bound and tell the Executor to wrap network commands with OS `timeout` including kill-after. All tool events are captured into the trace journal (`trace.py:370-400`) as normalized `tool_call`, `tool_result`, `command_run`, `command_started`, and `file_changed` records for audit. The legacy client (`pentestgpt_legacy/`) is a human-driven interactive session where the user pastes security-tool output and the model summarizes it — it does not execute tools on behalf of the model.


Citations: [pentestgpt_agent/src/pentestgpt_agent/agents.py:15-97](https://github.com/GreyDGL/PentestGPT/blob/e8b1bb77d1ac00329675cec3b060aba971ec1ac8/pentestgpt_agent/src/pentestgpt_agent/agents.py#L15-L97) · [unified_agent/tools.py:40-93](https://github.com/GreyDGL/PentestGPT/blob/e8b1bb77d1ac00329675cec3b060aba971ec1ac8/unified_agent/tools.py#L40-L93) · [unified_agent/agent.py:104-131](https://github.com/GreyDGL/PentestGPT/blob/e8b1bb77d1ac00329675cec3b060aba971ec1ac8/unified_agent/agent.py#L104-L131) · [pentestgpt_agent/src/pentestgpt_agent/trace.py:370-400](https://github.com/GreyDGL/PentestGPT/blob/e8b1bb77d1ac00329675cec3b060aba971ec1ac8/pentestgpt_agent/src/pentestgpt_agent/trace.py#L370-L400)

### 0x4m4/hexstrike-ai (answered)

Security tools are integrated entirely through shell-command string construction and subprocess execution. The architecture has two layers. **MCP layer** (`hexstrike_mcp.py`): Each tool is a `@mcp.tool()`-decorated function (e.g., `nmap_scan` at line 284) that accepts typed parameters, logs the invocation, and POSTs a JSON payload to the Flask server's REST endpoint (e.g., `api/tools/nmap`). **Server layer** (`hexstrike_server.py`): Each Flask route (e.g., `@app.route("/api/tools/nmap")` at line 10327) receives the params, builds a raw shell command by string concatenation (`f"nmap {scan_type} -p {ports} {target}"`), and calls `execute_command()` or `execute_command_with_recovery()`. The actual execution is `EnhancedCommandExecutor` (line 6783): it runs `subprocess.Popen(cmd, shell=True)` (line 6876), reads stdout/stderr via threads, and returns the raw text as `{"stdout": ..., "stderr": ..., "return_code": ...}`. There is no output parsing — the raw shell output is passed back to the AI client verbatim. A few tools (BrowserAgent at line 13623, HTTPTestingFramework at line 13281) use Selenium/requests directly instead of shell commands. The `HexStrikeCache` (line 6668) caches results keyed by command+params hash with LRU eviction. The tool map covers 150+ named security tools (nmap, sqlmap, nuclei, hydra, etc.), but the mapping is purely to shell commands with no Docker/Kali sandbox isolation.


Citations: [hexstrike_mcp.py:283-310](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_mcp.py#L283-L310) · [hexstrike_server.py:10327-10375](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L10327-L10375) · [hexstrike_server.py:6783-6982](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L6783-L6982) · [hexstrike_server.py:6668-6734](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L6668-L6734) · [hexstrike_server.py:8636-8662](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L8636-L8662) · [hexstrike_server.py:13623-13722](https://github.com/0x4m4/hexstrike-ai/blob/d689933ff579d839c676c82b231f8e98326c5f04/hexstrike_server.py#L13623-L13722)

### BitterSecurity/Decepticon (answered)

**Tool surface per agent role.** Tools are `@tool`-decorated Python functions from `langchain_core.tools`. Each agent role gets a curated subset via `build_tools()` (`agents/build.py`, lines 494–561), which composes a baseline dict, applies plugin overrides, and checks safety-critical tool gates. The Decepticon orchestrator itself has `tools=[]` — all offensive work is delegated to specialists.

**Tool categories.** The `tools/` directory organizes tools by domain: `bash` (execute/kill/output/status — the core execution surface), `network` (nmap_scan, dns_recon, smb_recon, ssh_recon, ftp_recon, etc.), `web` (HTTP session with history, JWT forge/parse, GraphQL introspection, OAuth flow analysis), `cloud` (AWS, K8s, Terraform), `browser` (Playwright-based), `c2`, `reporting` (deterministic CVSS 3.1 score, HackerOne/Bugcrowd/SARIF templates, executive summary), `evidence` (asciicast recordings), `verification` (PoC runner with positive+negative controls), `opplan` (objective management), and `references` (CVE lookup, payload search, killchain lookup).

**Execution backends.** Bash tools delegate to `HTTPSandbox.execute_tmux()` (`tools/bash/bash.py`, lines 1–43), which runs commands inside a Docker sandbox container via tmux sessions managed by `decepticon.sandbox_kernel.tmux`. Web search/fetch tools (`tools/web/search.py`, lines 1–37) run a sandbox-side Python engine (`python3 -m decepticon.sandbox_web`) over the same `HTTPSandbox.execute()` surface, so all egress routes through the sandbox nftables allowlist.

**Output tiers.** The bash tool implements a three-tier output management system (`tools/bash/bash.py`, lines 69–94): inline return (≤15K chars), offload to `<workspace>/.scratch/` file (15K–100K), or size watchdog kill (>5M). ANSI escape sequences are stripped, repetitive lines are compressed (nmap/nuclei patterns), and surrogate characters are sanitized. Errors return structured `ToolErrorResult` dicts with `cause` and `recovery` fields parsed by the TUI (`tools/errors.py`, lines 23–47).


Citations: [packages/decepticon/decepticon/agents/build.py:494-561](https://github.com/BitterSecurity/Decepticon/blob/cd252a5467b91ccfdb46fde9562c75d671d33604/packages/decepticon/decepticon/agents/build.py#L494-L561) · [packages/decepticon/decepticon/tools/bash/bash.py:1-100](https://github.com/BitterSecurity/Decepticon/blob/cd252a5467b91ccfdb46fde9562c75d671d33604/packages/decepticon/decepticon/tools/bash/bash.py#L1-L100) · [packages/decepticon/decepticon/tools/web/search.py:1-40](https://github.com/BitterSecurity/Decepticon/blob/cd252a5467b91ccfdb46fde9562c75d671d33604/packages/decepticon/decepticon/tools/web/search.py#L1-L40) · [packages/decepticon/decepticon/tools/errors.py:23-47](https://github.com/BitterSecurity/Decepticon/blob/cd252a5467b91ccfdb46fde9562c75d671d33604/packages/decepticon/decepticon/tools/errors.py#L23-L47) · [packages/decepticon/decepticon/tools/network/__init__.py:1-35](https://github.com/BitterSecurity/Decepticon/blob/cd252a5467b91ccfdb46fde9562c75d671d33604/packages/decepticon/decepticon/tools/network/__init__.py#L1-L35) · [packages/decepticon/decepticon/agents/standard/recon.py:41-77](https://github.com/BitterSecurity/Decepticon/blob/cd252a5467b91ccfdb46fde9562c75d671d33604/packages/decepticon/decepticon/agents/standard/recon.py#L41-L77)

### gadievron/raptor (answered)

Security tools are integrated as **external subprocesses invoked through a sandbox layer**, never as in-process MCP servers or browser automations. The runner path is: CLI argparse → `raptor.py <mode>` dispatches to scripts in `packages/` (e.g. `packages/codeql/`, `packages/semgrep/`, `packages/fuzzing/`) which construct list-based `subprocess` arguments with `RaptorConfig.get_safe_env()` sanitised environment — no file-path interpolation into shell strings. The sandbox (`core/sandbox/__init__.py`) provides six independent isolation layers: user namespaces, network namespaces (blocks all network), PID namespaces, IPC namespaces, mount namespaces (pivot_root onto fresh tmpfs with read-only `/usr`/`/lib`), Landlock filesystem rules, and seccomp-bpf syscall filtering with egress proxy. Profile names (`full`, `strict`, `target_run`, `debug`, `frida`, `network-only`, `none`) govern which layers are active. Sandbox profiles are the ONLY way to downgrade isolation — controlled by `--sandbox <profile>` CLI flags parsed at startup, never from env vars or target content (prompt-injection safety). Tool output is captured as JSON or SARIF and fed back through the evidence system (`core/evidence/__init__.py`) which grades observations from `OBSERVED_RUNTIME` (strongest) down to `HEURISTIC` (weakest). Commands like Semgrep, CodeQL, AFL++, and Ghidra are run as shell commands through the sandboxed subprocess runner, with `core/sandbox/exec_stage.py` staging env-built artifacts as executable copies in private temp dirs before the sandboxed child execve.


Citations: [core/sandbox/__init__.py:1-100](https://github.com/gadievron/raptor/blob/265236fc9f328be7df46cee36969fd447463c3c6/core/sandbox/__init__.py#L1-L100) · [core/sandbox/cli.py:1-80](https://github.com/gadievron/raptor/blob/265236fc9f328be7df46cee36969fd447463c3c6/core/sandbox/cli.py#L1-L80) · [core/sandbox/profiles.py:1-100](https://github.com/gadievron/raptor/blob/265236fc9f328be7df46cee36969fd447463c3c6/core/sandbox/profiles.py#L1-L100) · [core/sandbox/exec_stage.py:1-57](https://github.com/gadievron/raptor/blob/265236fc9f328be7df46cee36969fd447463c3c6/core/sandbox/exec_stage.py#L1-L57)

### CyberStrikeus/CyberStrike (answered)

**56+ built-in tools** registered in `ToolRegistry.all()` at `tool/registry.ts`. Each tool is defined using `Tool.define()` which wraps a Zod schema for parameter validation and an async `execute()` function. Tools are filtered by the current agent's permission ruleset before being sent to the LLM.

**Shell execution** is via the `bash` tool (`tool/bash.ts`): commands are parsed with **tree-sitter** (a Bash language WASM parser) to extract file paths and command patterns for permission checking. The command is spawned via `Bun.spawn()` with a configurable timeout (default 2 min). Output is capped at 2000 lines / 50KB via the `Truncate` system, with overflow saved to files in `.claude/tool-output/`.

**Security tools:** `attack_script` executes bundled Python scripts (jwt_tamper, race_tester, ssrf_listener, file_upload_tester, cloud_storage_enum, subdomain_takeover, github_dorker, wayback_endpoints) from `data/scripts/`. The `http_replay` tool provides structured HTTP replay with request/response recording. The `inject_probe` tool generates payload batteries for injection testing. Platform-specific post-exploitation tools exist for AWS (`awshook`), Azure (`azurehook`), GCP (`gcphook`), Kubernetes (`kubehook`), Linux (`linuxhook`), macOS (`machook`), Windows (`winhook`), and containers (`containerhook`).

**MCP servers** are integrated via `mcp/index.ts` using the Model Context Protocol SDK, supporting stdio, SSE, and StreamableHTTP transports. 176+ MCP tools are discoverable. Built-in security MCP servers include github-security, cve, osint, cloud-audit, and board.

**eBPF tools** (`tool/ebpf.ts`) deploy Python-based eBPF scripts for kernel-level introspection (syscall sniffing, file hiding, process hiding, keylogging, etc.).

**The `hackbrowser` tool** operates an autonomous browser for crawling and capturing web app state, which feeds into the proxy-analyzer pipeline.

**Tool output truncation** (`tool/truncation.ts`) applies hard caps (2000 lines/50KB) with overflow saved to disk, and a cleanup scheduler removes expired output files after 7 days.


Citations: [packages/cyberstrike/src/tool/registry.ts:1-100](https://github.com/CyberStrikeus/CyberStrike/blob/61044eddf31d1549b54cea64a5c0dd694ab0341b/packages/cyberstrike/src/tool/registry.ts#L1-L100) · [packages/cyberstrike/src/tool/bash.ts:72-195](https://github.com/CyberStrikeus/CyberStrike/blob/61044eddf31d1549b54cea64a5c0dd694ab0341b/packages/cyberstrike/src/tool/bash.ts#L72-L195) · [packages/cyberstrike/src/tool/tool.ts:1-89](https://github.com/CyberStrikeus/CyberStrike/blob/61044eddf31d1549b54cea64a5c0dd694ab0341b/packages/cyberstrike/src/tool/tool.ts#L1-L89) · [packages/cyberstrike/src/tool/attack-script.ts:1-60](https://github.com/CyberStrikeus/CyberStrike/blob/61044eddf31d1549b54cea64a5c0dd694ab0341b/packages/cyberstrike/src/tool/attack-script.ts#L1-L60) · [packages/cyberstrike/src/mcp/index.ts:1-60](https://github.com/CyberStrikeus/CyberStrike/blob/61044eddf31d1549b54cea64a5c0dd694ab0341b/packages/cyberstrike/src/mcp/index.ts#L1-L60)

### samugit83/redamon (answered)

**Five system MCP servers in a Kali sandbox.** Tools are executed through `PhaseAwareToolExecutor` (`tools.py:2220`), which dispatches to either MCP servers or in-process tools. Five system MCP servers run inside the `kali-sandbox` container (`tools.py:266-332`): **network_recon** (curl, naabu, hydra, command exec), **nmap** (network mapper), **metasploit** (exploitation framework including msf_console), **nuclei** (template-based vulnerability scanner), and **playwright** (browser automation). Each connects via SSE with per-tool deadlines defined in `TOOL_DEADLINES_S` (`tools.py:2125-2161`), e.g. nmap 600s, nuclei 1800s, metasploit_console 2400s.

**In-process tools** live outside the Kali container: `query_graph`/`graph_schema`/`graph_summary` (Neo4j reads, `neo4j_read_pool.py`), `web_search` (Tavily API with optional Knowledge Base fallback), `shodan` (OSINT API), `google_dork` (SerpAPI), `tradecraft_lookup` (LLM-augmented security reference retrieval), and capture-proxy tools (`traffic_tools.py`) for reading captured HTTP traffic. Supply-chain tools split between Kali (`execute_osv_scanner` — passive, offline) and agent-native (`execute_guarddog`, `supply_chain_tools.py` — dispatches to a hardened analyzer container via the webapp).

**User-defined MCP servers** can be added through settings (`mcp_registry.py`), supporting `sse`, `streamable_http`, and `stdio` transports, with bearer auth. They're merged with system servers via `reload_mcp_manifests()` (`orchestrator.py:493`).

**Command building and output parsing.** Tools receive raw CLI arguments as a string (`args` key on tool_args), passed directly to the MCP server's `execute_*` handler. Output is not deterministically parsed — it's returned verbatim to the LLM, which produces a structured `OutputAnalysis` (`output_analysis`) with `chain_findings`, `verdict`, and `productivity` fields. A `classify_error_class()` helper (`error_class.py`) distinguishes tool/transport failures from application-level responses. Long-running tools (metasploit_console with `run`/`exploit`, hydra) support streaming progress callbacks (`nodes/execute_plan_node.py:113-125`).

Tool gating per-phase is enforced by `TOOL_PHASE_MAP` (project_settings.py), and the `PhaseAwareToolExecutor.execute()` checks `is_tool_allowed_in_phase()` before dispatching. Dangerous tools require an operator confirmation pause before execution.


Citations: [agentic/tools.py:266-360](https://github.com/samugit83/redamon/blob/b13da9cb5ad35ae75428b8f21794e799a25fd201/agentic/tools.py#L266-L360) · [agentic/tools.py:2125-2184](https://github.com/samugit83/redamon/blob/b13da9cb5ad35ae75428b8f21794e799a25fd201/agentic/tools.py#L2125-L2184) · [agentic/tools.py:2220-2270](https://github.com/samugit83/redamon/blob/b13da9cb5ad35ae75428b8f21794e799a25fd201/agentic/tools.py#L2220-L2270) · [agentic/orchestrator_helpers/nodes/execute_plan_node.py:41-282](https://github.com/samugit83/redamon/blob/b13da9cb5ad35ae75428b8f21794e799a25fd201/agentic/orchestrator_helpers/nodes/execute_plan_node.py#L41-L282) · [agentic/mcp_registry.py:44-100](https://github.com/samugit83/redamon/blob/b13da9cb5ad35ae75428b8f21794e799a25fd201/agentic/mcp_registry.py#L44-L100) · [agentic/supply_chain_tools.py:1-60](https://github.com/samugit83/redamon/blob/b13da9cb5ad35ae75428b8f21794e799a25fd201/agentic/supply_chain_tools.py#L1-L60)

### GH05TCREW/pentestagent (answered)

**Tool registration.** Tools self-register via the `@register_tool` decorator (`tools/registry.py:127`), which binds a name, description, JSON Schema, category, and executor function into a `Tool` dataclass (`tools/registry.py:35`). The loader (`tools/loader.py:11`) discovers tool modules under `pentestagent/tools/` and imports them. Currently registered tools: `terminal`, `browser`, `notes`, `web_search`, `finish`, `spawn_mcp_agent`, `despawn_mcp_agent`, plus the crew-orchestrator tools (`spawn_agent`, `wait_for_agents`, etc.) and the MCP-exposed tools (`get_server_status`, `run_task`, `store_memory`, etc.).

**How tools are called.** The `terminal` tool (`tools/terminal/__init__.py:35`) takes a `command` string and passes it to `runtime.execute_command()`. The `Runtime` abstraction (`runtime/runtime.py:353`) has two implementations: **LocalRuntime** (`runtime/runtime.py:443`) spawns a shell subprocess with `asyncio.create_subprocess_shell`, strips ANSI codes, and enforces a 300s timeout. **DockerRuntime** (`runtime/docker_runtime.py:39`) runs commands inside a Docker container via `exec_run(cmd=['bash', '-c', command])`, with optional VPN setup and network isolation. Both return structured `CommandResult` objects (exit_code, stdout, stderr). The terminal tool also attempts **auto-prefixing** (line 59-129): if the LLM emits flags without a binary name, it heuristically prepends the likely tool (e.g., `nmap` when `-sV` is seen).

**Browser and web search.** The `browser` tool (`tools/browser/__init__.py:61`) calls `runtime.browser_action()`, which uses **Playwright** (`runtime/runtime.py:571`) for navigate, click, type, screenshot, get_content, get_links/get_forms, and execute_js. The `web_search` tool (`tools/web_search/__init__.py:28`) queries **Tavily** API and returns synthesized answers plus source URLs.

**MCP servers as tool sources.** The `spawn_mcp_agent` tool (`tools/mcp_agent.py:352`) spawns a child PentestAgent process over a PTY/FIFO transport and registers its MCP-exposed tools into the parent agent's tool list. When an MCP server exposes >128 tools, a **RAG optimizer** (`mcp/mcp_rag_optimizer.py`) replaces them with a meta-tool that retrieves the relevant subset via embedding similarity (`base_agent.py:694-698`).

**Output parsing.** Tool results are returned as strings (truncated to 50000 chars for terminal, line 136) and injected into the LLM conversation as `tool`-role messages. The executor (`tools/executor.py:59`) wraps execution with argument validation, retries (configurable), and timeout enforcement, tracking all results in `execution_history`.


Citations: [pentestagent/tools/registry.py:127-165](https://github.com/GH05TCREW/pentestagent/blob/8dde193e41d34ac53ee87374316e5d2fe7cec946/pentestagent/tools/registry.py#L127-L165) · [pentestagent/runtime/runtime.py:593-660](https://github.com/GH05TCREW/pentestagent/blob/8dde193e41d34ac53ee87374316e5d2fe7cec946/pentestagent/runtime/runtime.py#L593-L660) · [pentestagent/runtime/docker_runtime.py:143-181](https://github.com/GH05TCREW/pentestagent/blob/8dde193e41d34ac53ee87374316e5d2fe7cec946/pentestagent/runtime/docker_runtime.py#L143-L181) · [pentestagent/tools/mcp_agent.py:352-418](https://github.com/GH05TCREW/pentestagent/blob/8dde193e41d34ac53ee87374316e5d2fe7cec946/pentestagent/tools/mcp_agent.py#L352-L418) · [pentestagent/tools/browser/__init__.py:61-89](https://github.com/GH05TCREW/pentestagent/blob/8dde193e41d34ac53ee87374316e5d2fe7cec946/pentestagent/tools/browser/__init__.py#L61-L89)

### Armur-Ai/Pentest-Swarm-AI (answered)

The project wraps **33 security tools** as Go adapters, listed in `internal/tools/coordinator.go:70-109`. Each implements the `Tool` interface (`base.go:9-18`) with `Name()`, `Run()`, and `IsAvailable()` methods. Tools include: subfinder (subdomain discovery), httpx (HTTP probing), nuclei (template vuln scanning), naabu (port scanning), katana (web crawling), dnsx (DNS), gau (URL history), nmap, sqlmap, ffuf, gobuster, feroxbuster, trufflehog, gitleaks, semgrep, amass, dalfox (XSS), jwt_tool, arjun (parameter discovery), interactsh (OOB callbacks), nikto, wpscan, checkov, cloudsplaining, prowler, pacu, scoutsuite, kube-hunter, droopescan, wafw00f, whatweb, dotdotpwn, crackmapexec, bloodhound, ysoserial, crlfuzz, testssl, gxss.

**Execution mechanism**: Tools run as subprocesses via `executor.go:18-62` which uses `os/exec.CommandContext` with an augmented PATH from `toolpath.AugmentedPATH()` so tools installed via `go install` or `pentestswarm install-tools` are found regardless of shell PATH. The `RunToolCommand` wrapper (`executor.go:76-112`) adds timeouts and parses JSONL output via `parseJSONLines` into structured findings.

**Coordinator**: The `Coordinator` (`coordinator.go:55-275`) runs tools concurrently via goroutines, supports `RunAll` (parallel dispatch of every available tool) and `RunSelected` (by tool name). Results stream per-tool as they complete through a channel. Hooks (`OnStart`, `OnDone`, `OnSkip`) feed into the campaign event stream so missing binaries are surfaced as live warnings.

**Additional execution paths**: The exploit executor (`internal/agent/exploit/executor.go:18-36`) runs LLM-generated `httpreq` commands, scope-validated. A headless browser driver (`internal/browser/browser.go:1-61`) renders JS SPAs and harvests back-end API calls. An MCP server (`internal/mcp/tools.go:16-147`) exposes `scan_target`, `quick_recon`, `explain_finding` and `campaign_status` as tool calls for external AI agents. Output parsing is per-adapter — nuclei templates produce `VulnerabilityRecord` structs with clean titles, sqlmap extracts injection points for later timing re-proof.


Citations: [internal/tools/coordinator.go:55-116](https://github.com/Armur-Ai/Pentest-Swarm-AI/blob/40985e3184a5622fa76dc0b491ccb51b48d7acdf/internal/tools/coordinator.go#L55-L116) · [internal/tools/executor.go:1-113](https://github.com/Armur-Ai/Pentest-Swarm-AI/blob/40985e3184a5622fa76dc0b491ccb51b48d7acdf/internal/tools/executor.go#L1-L113) · [internal/tools/base.go:1-28](https://github.com/Armur-Ai/Pentest-Swarm-AI/blob/40985e3184a5622fa76dc0b491ccb51b48d7acdf/internal/tools/base.go#L1-L28) · [internal/browser/browser.go:1-60](https://github.com/Armur-Ai/Pentest-Swarm-AI/blob/40985e3184a5622fa76dc0b491ccb51b48d7acdf/internal/browser/browser.go#L1-L60) · [internal/mcp/tools.go:16-147](https://github.com/Armur-Ai/Pentest-Swarm-AI/blob/40985e3184a5622fa76dc0b491ccb51b48d7acdf/internal/mcp/tools.go#L16-L147) · [internal/agent/exploit/executor.go:1-100](https://github.com/Armur-Ai/Pentest-Swarm-AI/blob/40985e3184a5622fa76dc0b491ccb51b48d7acdf/internal/agent/exploit/executor.go#L1-L100)

### berylliumsec/nebula (answered)

Tools are integrated through a **three-layer architecture**: `ToolSpec` definitions, a `ToolBroker` execution engine, and a `SandboxRunner` for container isolation.

**Core shell commands** (`automation_tools.py:78-163`) expose `run_command` and `process_io` as typed `ToolSpec` objects. Each spec declares a `risk_class`, `input_schema` (JSON Schema), `filesystem_access`, `network_access`, `target_argument`, `timeout_seconds`, and a `parser` contract (`tools.py:281-394`). The `run_command` tool accepts a command string, working directory, timeout, background flag, and network mode (`none` or `project_scope`); on host execution mode it also provides `host` networking (`automation_tools.py:354-367`).

**Container sandbox** (`sandbox.py:270-299`): `SandboxRequest` specifies the image, command, workspace path, network mode (`NONE`, `SCOPED`, `VPN`, `UNRESTRICTED`), egress rules (IP+port whitelist at `sandbox.py:80-112`), user namespace (`NON_ROOT` by default), read-only root filesystem, CPU/memory/timeout limits. `ContainerSandboxRunner.run` (`sandbox.py:1885`) builds a `docker/podman run` command from these parameters. If no container runtime is configured, `AnalysisOnlyRunner.run` (`sandbox.py:1027-1032`) throws `SandboxUnavailable` — there is **no host fallback**.

**MCP servers** (`mcp.py:1-80`) are connected through a gateway shim using stdio or Streamable HTTP transport, each with its own `McpServerProfile` (approval mode, auth mode, CWD policy).

**Tool-to-role mapping** (`agent_tooling.py:74-86`): `run_command`/`process_io` → `NETWORK_SERVICE`, `nmap.*` → `NETWORK_SERVICE`, `nuclei.*` → `WEB_API`, `searchsploit.*` → `VULNERABILITY_INTELLIGENCE`, `semgrep.*` → `CODE_ANALYSIS`, `browser.*` → `NETWORK_SERVICE`.

**SSH environments** (`environments.py:1-80`) create one `ssh.<host>.run_command` tool per enabled SSH host, sharing the same policy/approval/ledger path as container tools.

**Security browser** (`agent_security_tools.py:60-80`) provides an MCP surface for the agent to proxy requests through, intercept traffic, replay requests, and launch assessments — all scoped to the engagement.

**Web search** (`web_search.py:1-40`) runs through a pinned SearXNG loopback container — it's research, not recon: no tool can navigate to a result URL without passing scope checks.

**The ToolBroker** (`tools.py:1756-1777`) orchestrates everything: it holds the `ToolRegistry`, `PolicyEngine`, `SandboxRunner`, `ToolLedger`, `DNS resolver`, and `evidence_recorder`. Every invocation is resolved against policy before execution and its output is captured as a `ToolResultReceipt` with timing, evidence IDs, and artifact references.


Citations: [src/nebula/v3/automation_tools.py:78-163](https://github.com/berylliumsec/nebula/blob/7332d9a05127933d2cc649e6797c9586466cfa8a/src/nebula/v3/automation_tools.py#L78-L163) · [src/nebula/v3/tools.py:281-394](https://github.com/berylliumsec/nebula/blob/7332d9a05127933d2cc649e6797c9586466cfa8a/src/nebula/v3/tools.py#L281-L394) · [src/nebula/v3/sandbox.py:270-299](https://github.com/berylliumsec/nebula/blob/7332d9a05127933d2cc649e6797c9586466cfa8a/src/nebula/v3/sandbox.py#L270-L299) · [src/nebula/v3/sandbox.py:1020-1032](https://github.com/berylliumsec/nebula/blob/7332d9a05127933d2cc649e6797c9586466cfa8a/src/nebula/v3/sandbox.py#L1020-L1032) · [src/nebula/v3/agent_tooling.py:74-86](https://github.com/berylliumsec/nebula/blob/7332d9a05127933d2cc649e6797c9586466cfa8a/src/nebula/v3/agent_tooling.py#L74-L86) · [src/nebula/v3/tools.py:1756-1777](https://github.com/berylliumsec/nebula/blob/7332d9a05127933d2cc649e6797c9586466cfa8a/src/nebula/v3/tools.py#L1756-L1777)
