@opensploit/core
v0.2.0
Published
Autonomous penetration testing plugin for OpenCode
Downloads
199
Maintainers
Readme
OpenSploit
The autonomous penetration testing plugin for OpenCode.
OpenSploit turns OpenCode into a penetration testing platform. It provides pentest-specific agents, MCP security tool orchestration, engagement state tracking, and attack methodology — all as a plugin that runs on stock OpenCode.
What it provides
11 pentest agents — Master orchestrator + 10 specialized sub-agents (recon, enum, exploit, post-exploitation, reporting, research, build, captcha, validator, tool-runner). Each follows the TVAR reasoning framework and delegates work through a hierarchical agent system.
13 custom tools — security tool invocation (mcp_tool, cli_in_container, plus a detach trio for held processes), tool registry search (RAG), engagement state read/write, hosts management, browser VNC mode, and the validated-engagement memory surface (save_solve, solve_search, save_validation_failure).
7 hooks — Live engagement state injection, session path rewriting, ultrasploit auto-approve, compaction context preservation, trajectory recording, chat-message filtering, and chat-messages transformation.
TUI features — OpenSploit logo, rainbow "ultrasploit" text, sidebar indicator, terminal title override, slash commands.
Validated-engagement memory (Doc 36)
After a successful engagement, OpenSploit auto-spawns a hidden pentest/validator sub-agent that re-runs the procedure against the target to verify each reported step actually reproduces the objective, then saves a concise canonical solve-doc into a LanceDB store. Future engagements call solve_search to retrieve relevant prior solves and adapt them. Failed re-validations are recorded separately in a queryable audit table — useful both as a reliability flag on the original report and as a negative-label training signal.
Install
Add the plugin to your OpenCode configuration:
// .opencode/opencode.jsonc
{
"plugin": ["@opensploit/core"]
}// .opencode/tui.json
{
"plugin": ["@opensploit/core"]
}Or use the full OpenSploit desktop app which comes preconfigured.
How it works
- OpenSploit registers pentest agents via the config hook — the default agent becomes
pentest - The master agent orchestrates the engagement, spawning sub-agents for each phase
- Sub-agents discover and invoke security tools via the MCP tool registry
- Tools run in Docker containers (nmap, sqlmap, ffuf, hydra, etc.) managed by the container manager
- Engagement state (ports, credentials, vulnerabilities) is shared across all agents
- The system.transform hook injects live state into every agent's system prompt
MCP Security Tools
The security tools run as MCP servers in Docker containers, maintained in a separate repository:
silicon-works/mcp-tools — 70+ tools including nmap, sqlmap, ffuf, hydra, metasploit, impacket, netexec, nuclei, nikto, and more.
Contributing
Add an agent — Write a markdown file with YAML frontmatter describing the agent's role, permissions, and prompt. Submit a PR.
Add a tool — Write a TypeScript file using the tool() API from @opencode-ai/plugin. The tool receives a ToolContext with session info and returns a string result.
Add an MCP server — Fork mcp-tools, create a Python MCP server extending BaseMCPServer, wrap it in Docker.
Improve a prompt — Agent prompts are in src/agents/prompts/. Better methodology, more techniques, clearer instructions — all welcome.
Development
git clone https://github.com/silicon-works/opensploit-plugin
cd opensploit-plugin
bun install
bun testTo test with OpenCode:
# In your opencode project
echo '{ "plugin": ["file:///path/to/opensploit-plugin"] }' > .opencode/opencode.jsonc
bun devArchitecture
src/
index.ts — Server plugin entry (agents, tools, hooks)
tui.tsx — TUI plugin entry (logo, ultrasploit, rainbow)
agents/ — Agent definitions + prompt files
tools/ — Custom tools (mcp_tool, registry search, etc.)
hooks/ — Hook implementations (state injection, path rewriting, etc.)
memory/ — LanceDB: tool registry + validated solve-doc store (Doc 36)
pattern/ — Anonymization utility (anonymizeText, containsSensitiveData)
container/ — Docker container lifecycle management
session/ — Session hierarchy and directory management
training/ — Trajectory recording
util/ — Target validation, phase gating, output normalizersLicense
MIT
Built on OpenCode by Silicon Works Ltd.
