<h1 align="center">opencode-pentester</h1>
<p align="center">
<b>AI-Powered Penetration Testing & Security Audit Framework</b><br>
Automated bug bounty hunting, assessment, and OWASP security auditing powered by AI agents
</p>
<p align="center">
<a href=" src=" alt="GitHub Stars"></a>
<a href=" src=" alt="MIT License"></a>
<a href=" src=" alt=" 1.11.1"></a>
<a href="#"><img src=" alt="opencode Compatible"></a>
<a href="#"><img src=" alt="69 Attack Categories"></a>
<a href="#"><img src=" alt="17 OWASP Categories"></a>
<a href="#"><img src=" alt="75 Tools"></a>
<a href="#"><img src=" alt="12 Agents"></a>
<a href=" src=" alt="CI Status"></a>
</p>
<p align="center">
<a href="#quickstart">Quickstart</a> •
<a href="#features">Features</a> •
<a href="#usage">Usage</a> •
<a href="#docs">Docs</a> •
<a href="#contributing">Contribute</a> •
<a href="#license">License</a>
</p>
---
| Feature | opencode-pentester | PentestGPT | Claude Code + Manual | Burp Suite Pro |
|---------|-------------------|------------|---------------------|----------------|
| AI Agents | 12 specialized | 1 general | 1 general | None |
| Attack Categories | 69 | ~15 | Unlimited (manual) | N/A |
| OWASP Audits | 17 | No | Manual | No |
| Findings Database | SQLite + cross-session | None | None | Limited |
| Attack Chains | Auto-correlated | None | Manual | Manual |
| Report Generation | 8-section auto | Basic | Manual | Template |
| Pipeline Engine | YAML DAGs | None | None | None |
| Scope Enforcement | Built-in | None | None | None |
| Open Source | MIT | Partial | No | No |
| Cost | Free | $20/mo | $20/mo | $449/yr |
---
The first open-source framework that turns an AI coding assistant into a full penetration testing team.
While other tools automate single scans, opencode-pentester orchestrates 12 specialized AI agents through a complete engagement lifecycle from reconnaissance to professional report. It covers 69 attack categories across 16 domains for offensi and 17 OWASP Top 10 categories for defensive code audits.
Built for: Security researchers, penetration testers, bug bounty hunters, De engineers, and anyone who ships code and wants it secure.
---
> [!TIP]
> Recommended free models: opencode/space-bunny-free (select the max in /models when a), or opencode/mimo-v2.6-flash-free for a fast alternative. Both are currently listed at $0 per token on OpenCode Zen. Free access is temporary and may be rate-limited, so check /models for current a. Space Bunny Free follows a zero-retention policy; OpenCode notes that MiMo free-tier data may be used to improve the model.
> [!NOTE]
> Skip the tools? The AI falls back to whatever is a via bash (curl, basic nmap). Still functional, just less automated. Pass --global-only to install.sh to skip tool installation.
---
| Feature | Description |
|---------|-------------|
| 69 Attack Categories | SQLi, XSS, SSRF, RCE, cloud misconfig, AD attacks, and 64 more across 16 domains |
| 12 AI Agents | Orchestrator, executor, recon, XSS/CSRF/injection/C, network, cloud, post-exploit, password agents |
| 17 OWASP Audits | Defensive code audit for apps: secrets, auth, RLS, CORS, rate limiting, and more |
| 75 Security Tools | nmap, sqlmap, nuclei, ffuf, burp, metasploit, bloodhound, and 68 more, auto-installed |
| SQLite Findings DB | Cross-session persistence, target dedup, attack chain correlation |
| Deterministic Gates | No premature termination: completion is a database fact, not a belief |
| E | Every finding includes PoC scripts, execution output, and screenshots |
| Professional Reports | 8-section reports with executi, attack narrati roadmap |
| Pipeline Engine | YAML-defined attack DAGs for repeatable, composable security testing |
| Scope Enforcement | Private IP blocking, rate limiting, OPSEC tagging, hard refusal list |
| Session Command Logs | Every tool run recorded with timestamp, exact command, exit code, duration, and sha256-hashed output for deterministic AI replay |
| Leads Ledger | Disco pathways are tracked; "done" is blocked until every lead is explored or closed with a reason |
| Persistence Railguard | Budget exhaustion triggers a "push harder" directive (open leads, untested surface, uncovered ) instead of a silent stop |
| Preflight Auto-Install | Missing required tools are auto-installed and before the pentest starts; the gate blocks otherwise |
| Per-Vuln Completion | Every finding is scored (status + tool + CVE + e + ); 100% means 100% |
---
> [!IMPORTANT]
> You must ha authorization before testing any system you do not own. See DISCLAIMER.md for full terms.
The AI follows a mandatory target-first dialog flow:
1. Ask for target dialog
2. Check the database: searches across all past engagements
3. Branch based on result: New target → scope collection | Existing target → resume options
#### --full-offensive: Maximum Co
| Setting | Normal | --full-offensive |
|---------|--------|-------------------|
| Authorization | Asked | Skipped |
| Scope | Collected | Full scope |
| Appro | Yes | Skipped |
| Time budget | User-set | 480 min (8h) |
| Categories | Selected | All 69 across 16 domains |
| Depth | User-set | Maximum (every ) |
| Parallelism | Sequential | Maximum |
#### Zero Human Inter
Requires in opencode.json:
Audit your own source code for 17 critical categories. Designed for apps built with Cursor, Copilot, Claude Code, Windsurf, or any AI coding tool.
17 OWASP Categories: Secrets exposure, database access, auth middleware, access control, frontend secrets, SSRF, CSRF, security headers, CORS, rate limiting, SQL injection, XSS, payment webhooks, file uploads, error handling, password hashing, dependencies.
---
| Domain | Count | Examples |
|--------|-------|----------|
| Injection | 9 | SQLi, NoSQLi, CMDi, SSTI, XXE, LDAP, SAML, Type Juggling, File Inclusion |
| Client-Side | 6 | XSS, CSRF, DOM-based, Prototype Pollution, CORS, Clickjacking |
| Ser | 6 | SSRF, HTTP Smuggling, Path Tra, File Upload, Deserialization, Host Header |
| Authentication | 4 | Auth Bypass, JWT, OAuth, Password Attacks |
| API Security | 4 | GraphQL, REST API, WebSockets, Web LLM |
| Web Applications | 9 | Access Control, Business Logic, Cache Attacks, Race Conditions, Open Redirect |
| Cloud & Containers | 5 | AWS, Azure, GCP, Docker, Kubernetes |
| System / Post-Exploit | 8 | PrivEsc, Acti, Hash Cracking, Pi, Reverse Shells |
| IP Infrastructure | 8 | Port Scanning, DNS, SMB, MITM, Sniffing, DoS, VLAN Hopping |
| Physical & Social | 1 | Social Engineering |
| Essential Skills | 3 | Burp Suite, Methodology, Reporting |
See docs/reference/ATTACK_INDEX.md for the full index with MITRE ATT&CK mappings.
---
---
Every tool run is recorded structurally in SQLite, so a session can be replayed
exactly as it happened: timestamp, command, output, exit code, and duration,
without relying on the AI's memory.
What each entry captures:
| Field | Meaning |
|-------|---------|
| created_at | UTC timestamp of the run |
| tool / command | Tool name and the exact command line executed |
| target / phase | Target host and lifecycle phase (recon, testing, …) |
| exit_code | Process exit status (null for non-tool entries) |
| duration_ms | Wall-clock runtime in milliseconds |
| output_file / output_hash | Output artifact durably copied to outputs/{engagement}/logs/ + its sha256 (tamper-e) |
| output_excerpt | First 800 chars of output stored inline for quick review |
The handoff report appendix ("Session Log") renders the full table, and the
state machine's completion gate is satisfied purely from these recorded rows.
---
The engine ne the AI's *beliefs* that work is done. Every
"comprehensive" claim must be backed by database state.
The recon completion gate refuses to pass until a doctor preflight PASS row
exists in session_log. A FAIL row means *keep installing*; never "start anyway".
Any disco surface is a lead. The review gate blocksdone while any lead is open. Closing requires a valid reason
(explored|false-positive|dead|out-of-scope|duplicate). findings.sh push
resurfaces abandoned leads whenever the AI drifts into a loop.
When the time budget hits 0 the AI does NOT silently stop and report. It runspush, which computes open leads, services with no findings, and attack domains
with zero logged tests (engagement-scoped only, with no cross-engagement leakage),
embeds the quantified gate saturation ("X/Y mandatory items satisfied, still
pending: …"), and continues attacking until the gate exits 0. Normal transitions
into reporting or complete and normal handoff generation are blocked until the
budget is exhausted. Early completion requires an explicit reasoned o;handoff --draft REASON is the only draft/report exception.
Every finding must ha status, tracked tool, checked C
(PoC/output), and logged attack . completion report lists, per finding,
every logged (command, tool, phase, exit) and appends an aggregate
saturation table (every checklist phase satisfied, total %,
pending items) to completion/summary.md. The 100% value is printed only when every
finding passes all fi. The review gate requires the completion
document before reporting.
---
Q: Is this legal?
A: Yes, with written authorization. This tool is designed for authorized penetration testing, bug bounty programs, and auditing your own systems. See DISCLAIMER.md.
Q: Do I need opencode?
A: Yes. This is a skill/plugin for opencode. Install opencode first, then clone this repo.
Q: What LLM works best?
A: Space Bunny Free (opencode/space-bunny-free) is the primary recommendation. Select the max when it is a in /models. MiMo-V2.6-Flash Free (opencode/mimo-v2.6-flash-free) is a fast alternative. Both currently have $0 token pricing on OpenCode Zen, but free access is temporary and may be rate-limited.
Q: Can I use this for bug bounty?
A: Yes. The bounty_sweep pipeline is optimized for fast bug bounty reconnaissance. Always respect program scope.
Q: What if I don't want to install 60+ tools?
A: Run bash install.sh --global-only. The AI falls back to curl, bash, and whatever is a.
Q: How is this different from just asking ChatGPT to hack something?
A: Structured engagement lifecycle, deterministic completion gates, e findings, cross-session persistence, and 12 specialized agents with domain-specific playbooks.
---
| Document | Description |
|----------|-------------|
| SKILL.md | Engagement lifecycle |
| AI-CHECKLIST.MD | 17-category audit prompt |
| AGENTS.md | Security rules |
| docs/reference/ATTACK_INDEX.md | 69-category attack index |
| docs/reference/TOOL_REGISTRY.md | 75-tool catalog |
| docs/AGENT-GUIDE.md | Agent guide |
---
Contributions welcome! See CONTRIBUTING.md for guidelines.
---
If this tool helped you find or secure your code:
---
MIT License. See LICENSE for details.
---
<p align="center">
<sub>Built with love by the security community. Stay ethical. Stay curious.</sub>
</p>
开发语言:Shell
Star 数:44
该项目属于安全软件方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Full-spectrum security assessment tool for opencode — defensive code audit (17 vulnerability categories) + offensive penetration testing (63 attack categories, 15 agents, 11 domains). AI-powered AppSec, red teaming, and pentesting for vibe-coded apps.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | opencode-pentester - Full-spectrum security assessment tool for opencod |
| 所属分类 | 安全软件 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 22:46:51 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 459 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |