opencode-pentester

Orchestrates authorized penetration tests and 17-category code security audits via a SQLite-backed state machine.

37|4|Updated Jun 15, 2026
One-click install
npx skills add https://github.com/humaidhahm/opencode-pentester --skill opencode-pentester-humaidhahm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-pentester
Source: https://github.com/humaidhahm/opencode-pentester
Command: npx skills add https://github.com/humaidhahm/opencode-pentester --skill opencode-pentester-humaidhahm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manual penetration testing and security code audits are unstructured, easy to abandon early, and produce findings without evidence. This Skill turns an AI coding assistant into a coordinated security testing workflow with deterministic completion gates, cross-session findings persistence, and evidence-backed reporting. ## Core Features & Use Cases - Offensive engagement mode (Mode 1): Runs authorized pentests against live targets across 69 attack categories in 16 domains, with a target-first dialog flow, scope enforcement, preflight tool installation, a leads ledger that blocks completion while pathways remain unexplored, and per-vulnerability completion scoring. - Defensive code audit mode (Mode 2): Audits a local repository against 17 vulnerability categories (secrets exposure, RLS/database access, auth middleware, IDOR, SSRF, CSRF, SQLi, XSS, webhooks, file uploads, and more), writing reports to security/reports/. - Deterministic evidence trail: Every tool run is logged to SQLite with command, exit code, duration, and sha256-hashed output, enabling full session replay and an 8-section professional handoff report. - Use Case: A security engineer with written authorization runs an 8-hour full-offensive engagement against a web target; the framework auto-installs missing tools, tracks every discovered lead, correlates attack chains, and generates a remediation-ready report. ## Quick Start Tell the AI: I have authorization to pentest https://target.com, use opencode-pentester with a 120 minute time budget, or point it at a local repo and ask it to run the 17-category security audit.

Frequently Asked Questions about opencode-pentester

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an automated penetration test with opencode?

Install the skill with install.sh, then run opencode with a prompt stating you have authorization, the target URL, and a time budget. The skill follows a target-first dialog, checks the findings database for prior engagements, then proceeds through recon, testing, exploiting, and reporting phases.

How do I audit my own code for security vulnerabilities with AI?

Point the skill at a local repository and ask for the security audit. Mode 2 runs a 17-category check covering secrets exposure, auth middleware, access control, SSRF, CSRF, SQL injection, XSS, and more, writing findings to security/reports/ with file:line evidence.

Is AI penetration testing legal to use?

Penetration testing is legal only with written authorization from the system owner. This framework is designed for authorized engagements, bug bounty programs within scope, and auditing your own systems, and includes a disclaimer and scope enforcement for that purpose.

What happens if pentest tools like nmap or sqlmap are missing?

The doctor.sh preflight script can auto-install missing required tools via apt, go, pip, gem, npm, or cargo. If installation is impossible, a fallback matrix maps each missing binary to manual equivalents such as grep-based secret scanning or hand-crafted SQLi payloads.

How does the skill prevent the AI from stopping a pentest early?

Completion is a database fact, not an AI judgment. A deterministic gate checks mandatory checklist items from SQLite session logs, the leads ledger blocks completion while pathways remain open, and budget exhaustion triggers a persistence directive instead of a silent stop.

Does the pentest skill work without the database engine installed?

Yes, it degrades gracefully. If engine scripts or findings.sh are missing, the skill follows its playbooks directly and falls back to logging evidence in a plain NDJSON session file instead of aborting the engagement.