Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

ย 

History

2,916 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Zen-AI-Pentest

Professional AI-Powered Penetration Testing Framework
Autonomous security assessment powered by state-of-the-art language models

Tests Security OpenSSF Python License Demo

Features โ€ข Quick Start โ€ข Architecture โ€ข Pipelines โ€ข Security โ€ข Docs


๐Ÿ”ฅ Overview

Zen-AI-Pentest is an autonomous, AI-driven penetration testing framework that combines cutting-edge large language models with 72+ professional security tools. Built for security professionals, bug bounty hunters, and enterprise red teams.

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#58a6ff', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#58a6ff', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#58a6ff', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#58a6ff', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph TB
    subgraph "๐ŸŒ Client Interface"
        WebUI["React Dashboard<br/>Cloudflare Pages"]
        CLI["Python CLI"]
        API["REST API + WebSocket"]
    end

    subgraph "โšก API Gateway"
        FastAPI["FastAPI Server"]
        Auth["JWT / RBAC Auth"]
        WsMgr["WebSocket Manager"]
    end

    subgraph "๐Ÿง  AI Orchestrator"
        AgentMgr["Agent Manager"]
        Guardrails["๐Ÿ›ก๏ธ Guardrails<br/>IP/Domain Filter"]
        TaskQ["๐Ÿ“Š Task Queue"]
        Risk["โš ๏ธ Risk Levels 0-3"]
        State["๐Ÿ“ˆ State Machine<br/>ReAct Pattern"]
    end

    subgraph "๐Ÿค– Agent Pool"
        A1["Agent #1<br/>Recon"]
        A2["Agent #2<br/>Exploit"]
        A3["Agent #3<br/>Report"]
        AN["Agent #N<br/>Custom"]
    end

    subgraph "๐Ÿ”ง Security Toolkit"
        Nmap["nmap ยท masscan"]
        Web["nuclei ยท sqlmap ยท zap ยท ffuf"]
        Exploit["Metasploit ยท SearchSploit"]
        Recon["amass ยท subfinder ยท httpx"]
        AD["BloodHound ยท NetExec"]
        OSINT["sherlock ยท theHarvester"]
    end

    subgraph "๐Ÿ“Š Analysis & Reporting"
        Evidence["๐Ÿ“‹ Evidence Collection<br/>Cryptographic Signatures"]
        Attack["๐Ÿ—บ๏ธ Attack Path Analysis<br/>Cytoscape.js Graphs"]
        Report["๐Ÿ“„ Report Generator<br/>PDF ยท HTML ยท DOCX ยท JSON"]
        Compliance["๐Ÿ“‹ Compliance Mapping<br/>ISO 27001 ยท PCI DSS ยท NIST"]
        RiskScoring["๐ŸŽฏ Risk Scoring<br/>CVSS ยท EPSS ยท Bayesian Filter"]
    end

    subgraph "๐Ÿ’พ Data Layer"
        PG[("๐Ÿ˜ PostgreSQL<br/>Persistent State")]
        Redis[("โšก Redis<br/>Cache & Queue")]
        FS[("๐Ÿ“ File Storage<br/>Reports & Evidence")]
    end

    WebUI --> FastAPI
    CLI --> FastAPI
    API --> FastAPI
    FastAPI --> Auth
    Auth --> AgentMgr
    AgentMgr --> Guardrails
    Guardrails --> TaskQ
    TaskQ --> Risk
    Risk --> State
    State --> A1 & A2 & A3 & AN
    A1 --> Nmap & Recon
    A2 --> Web & Exploit
    A3 --> AD & OSINT
    AN --> Nmap & Web
    Nmap --> Evidence
    Web --> Attack
    Exploit --> Evidence
    Attack --> Report
    State --> Report
    Report --> Compliance
    Report --> RiskScoring
    Evidence --> PG
    Attack --> PG
    Compliance --> PG
    RiskScoring --> Redis
    Report --> FS
Loading

โœจ Features

๐Ÿค– Autonomous AI

  • ReAct Pattern: Reason โ†’ Act โ†’ Observe โ†’ Reflect
  • State Machine: IDLE โ†’ PLANNING โ†’ EXECUTING โ†’ OBSERVING โ†’ REFLECTING โ†’ COMPLETED
  • Memory System: Short-term, long-term, context windows
  • Self-Correction: Retry logic & adaptive planning
  • Human-in-the-Loop: Optional pause for critical decisions

๐ŸŽฏ Risk Engine

  • False Positive Reduction: Bayesian + multi-model voting
  • Business Impact: Financial, compliance, reputation scoring
  • CVSS/EPSS: Industry-standard vulnerability assessment
  • LLM Voting: Multi-model consensus for accuracy
  • Priority Ranking: Automated finding prioritization

๐Ÿ”’ Exploit Validation

  • Sandboxed Execution: Docker isolated testing
  • 4-Level Safety: Read-Only โ†’ Full exploitation
  • Evidence Collection: Screenshots, HTTP captures, PCAP
  • Chain of Custody: Complete audit trail
  • Auto-Remediation: Fix recommendations

๐Ÿง  AI Persona System

  • 11 Specialized Personas: Recon, Exploit, Report, Audit, Social, Network, Mobile, Red Team, ICS, Cloud, Crypto
  • CLI Tool: k-recon, k-exploit, k-chat
  • REST API: Flask-based with WebSocket
  • Web UI: Modern browser interface
  • Screenshot Analysis: AI-powered image analysis

๐Ÿ—บ๏ธ Attack Path Analysis

  • Visual Graphs: Interactive Cytoscape.js visualization
  • Entry Point Mapping: Track all attack vectors
  • Crown Jewel Analysis: Critical asset identification
  • Attack Simulation: Test paths without execution
  • Risk Scoring: Difficulty & impact assessment

๐Ÿ“Š Benchmarking

  • Competitor Comparison: vs PentestGPT, AutoPentest
  • Test Scenarios: HTB, OWASP WebGoat, DVWA
  • Metrics: Time-to-find, coverage, false positive rate
  • Visual Reports: Charts & statistical analysis
  • CI Integration: Automated regression testing

๐Ÿ”ง 72+ Integrated Security Tools

Category Tools
Network Scanning nmap ยท masscan ยท scapy ยท tshark ยท tcpdump ยท netdiscover ยท arp-scan
Web Security BurpSuite ยท SQLMap ยท Gobuster ยท OWASP ZAP ยท FFuF ยท Nikto ยท WAFW00F ยท WhatWeb ยท Nuclei
Exploitation Metasploit Framework ยท SearchSploit
Brute Force Hydra ยท Hashcat ยท John ยท Ncrack
Reconnaissance Amass ยท Nuclei ยท TheHarvester ยท Subfinder ยท HTTPX ยท Sherlock ยท Scout
Active Directory BloodHound ยท NetExec ยท Responder ยท ldapsearch ยท enum4linux
OSINT Sherlock ยท Ignorant ยท TheHarvester ยท Scout
Code Analysis Semgrep ยท TruffleHog ยท Gitleaks ยท Bandit
Container Trivy ยท Docker ยท Kubectl
Wireless Aircrack-ng ยท airmon-ng ยท airodump-ng ยท aireplay-ng
System Netcat ยท Socat ยท OpenSSL ยท Proxychains ยท Tor

๐Ÿงฉ MCP Server Infrastructure

8 MCP servers for AI-tool integration, registered in opencode.jsonc:

Server Purpose Tools
omni-ai AI chat via OmniRoute (free models) chat, stream, vision, web_extract, list_models
qterminal Shell/Docker orchestration spawn, exec, kill, network, images, agents
zen-agents 11-agent orchestration agent_run, workflow_create, full_audit, agent_list
metasploit Metasploit RPC connector module_search, module_execute, session_list
vpn-killswitch Connection-loss failover check, rotate, status, set_proxy, history
obscura Encrypted secret vault store, get, list, delete, init, export
ip-tracker Visitor IP tracking check_visitors, resolve_ip, my_public_ip

๐Ÿ“š Skills System (95 Skills)

Type Count Description
Framework 5 zen-framework, agents-usage, tools, risk-engine, workflow
Platform 9 devops-docker, ci-cd, rag-vector, browser-automation, multi-language, security-review, bash, ai-delegation, solidity
Tools 39 nmap, masscan, nuclei, sqlmap, metasploit, ffuf, gobuster, bloodhound, hydra, zap, nikto, amass, subfinder, sherlock, trivy, semgrep, burpsuite, etc.
Modules 42 exploit modules (xss, sqli, ssrf, lfi, deserialization), osint modules (dns, email, whois, cert), scanners, reporting

๐Ÿค– WhatsApp Bot

  • E2E encrypted via @whiskeysockets/baileys (QR code pairing)
  • /ask <prompt> โ€” AI-powered security Q&A via OmniRoute
  • /voice <text> โ€” TTS response via edge-tts + ffmpeg
  • QR displayed in web UI at http://localhost:8080/qr.html

๐Ÿ›ก๏ธ VPN Killswitch

Automatic connection-loss detection and VPN rotation:

  • Detects: 429 (rate limit), 5xx (server error), timeouts, connection refused
  • Supports: WireGuard and SOCKS5 proxy
  • Auto-rotates VPN endpoint on failure
  • Configurable check interval (default: 15s)

๐Ÿš€ Quick Start

๐Ÿณ Docker (Full Stack)

git clone https://github.com/SHAdd0WTAka/zen-ai-pentest.git
cd zen-ai-pentest
cp .env.example .env
# Edit .env: set OPENCODE_API_KEY=oc_xxx
docker compose up -d
Service Port
Web Terminal :8080
OmniRoute AI :20128
Hermes Agent โ€”
WhatsApp Bot :23001

๐Ÿ“ฆ Local Install

pip install -r requirements.txt
python database/models.py
python api/main.py
# Subdomain scanner
python scan_target_subdomains.py example.com
# Advanced CLI
python tools/subdomain_enum.py example.com --advanced

๐Ÿค– AI Agents (CLI)

# 11 specialized agent personas
deep-recon --target example.com
deep-exploit --target example.com --force
deep-audit --target example.com --phases recon,scan,exploit,report
deep-report --scan-id wf-abc123 --format pdf

๐Ÿ“ฑ WhatsApp Bot

# QR pairing in browser
open http://localhost:8080/qr.html
# Commands:
/ask Scan example.com and find vulnerabilities
/voice Describe the OWASP Top 10

๐Ÿ’ป Usage

Python API

from agents.react_agent import ReActAgent, ReActAgentConfig

config = ReActAgentConfig(max_iterations=10, use_vm=True)
agent = ReActAgent(config)
result = agent.run(target="example.com", objective="Comprehensive security assessment")
print(agent.generate_report(result))

REST API

# Auth
curl -X POST http://localhost:8000/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"admin"}'

# Create scan
curl -X POST http://localhost:8000/scans \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Network Scan","target":"192.168.1.0/24","scan_type":"network"}'

# Execute tool
curl -X POST http://localhost:8000/tools/execute \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"tool_name":"nmap_scan","target":"scanme.nmap.org","parameters":{"ports":"22,80,443"}}'

# Generate report
curl -X POST http://localhost:8000/reports \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"scan_id":1,"format":"pdf","template":"default"}'

WebSocket (Real-Time)

const ws = new WebSocket("ws://localhost:8000/ws/scans/1");
ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log("Scan update:", data);
};

๐Ÿ—๏ธ Architecture

System Architecture

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#58a6ff', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#58a6ff', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#58a6ff', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#58a6ff', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph LR
    subgraph "Client"
        WEB["๐ŸŒ Web UI<br/>React ยท Cloudflare"]
        CLI["๐Ÿ’ป CLI ยท Python"]
        API_CLIENT["๐Ÿ”Œ REST Client"]
    end

    subgraph "API Gateway"
        FASTAPI["FastAPI + WebSocket"]
        AUTH["๐Ÿ” JWT/RBAC"]
        WS["๐Ÿ“ก WebSocket"]
    end

    subgraph "Orchestrator"
        G["๐Ÿ›ก๏ธ Guardrails"]
        TQ["๐Ÿ“Š Task Queue"]
        RL["โš ๏ธ Risk 0-3"]
        SM["๐Ÿ“ˆ State Machine"]
    end

    subgraph "Agents"
        A1["๐Ÿค– Agent Pool<br/>Docker Sandbox"]
    end

    subgraph "Tools"
        TOOLS["๐Ÿ”ง 72+ Tools<br/>nmap ยท nuclei ยท sqlmap<br/>metasploit ยท burp ยท hydra"]
    end

    subgraph "Analysis"
        EV["๐Ÿ“‹ Evidence"]
        AP["๐Ÿ—บ๏ธ Attack Path"]
        CC["๐Ÿ”— Chain of Custody"]
        COMP["๐Ÿ“Š Compliance"]
        REP["๐Ÿ“„ Reports"]
        RS["๐ŸŽฏ Risk Scoring"]
    end

    subgraph "Data"
        PG[("๐Ÿ˜ PostgreSQL")]
        RD[("โšก Redis")]
        FS[("๐Ÿ“ File Store")]
    end

    WEB --> FASTAPI
    CLI --> FASTAPI
    API_CLIENT --> FASTAPI
    FASTAPI --> AUTH
    AUTH --> WS
    WS --> G
    G --> TQ --> RL --> SM
    SM --> A1
    A1 --> TOOLS
    TOOLS --> EV & AP
    SM --> REP
    EV --> CC
    AP --> COMP
    CC --> RS
    EV --> PG
    AP --> PG
    COMP --> PG
    RS --> RD
    REP --> FS
Loading

๐Ÿค– AI Orchestration Architecture

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#58a6ff', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#58a6ff', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#58a6ff', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#58a6ff', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph TB
    subgraph "๐ŸŒ User Interface"
        WEB["Web Terminal :8080"]
        CLI["CLI deep-*"]
        WA["WhatsApp Bot"]
        API["REST API :8000"]
    end

    subgraph "๐Ÿง  AI Inference"
        OR["OmniRoute Proxy :20128"]
        FREE["oc/deepseek-v4-flash-free"]
        PAID["oc/gpt-4o ยท claude-3 ยท llama-3"]
        HA["Hermes Agent v0.15.2<br/>95 skills ยท agency-agents"]
    end

    subgraph "๐Ÿ”Œ MCP Servers"
        OA["omni-ai<br/>chat+vision+tools"]
        QT["qterminal<br/>shell+docker"]
        ZA["zen-agents<br/>11 agents"]
        MS["metasploit<br/>MSF RPC"]
        VK["vpn-killswitch<br/>failover"]
        OB["obscura<br/>vault"]
        IT["ip-tracker<br/>geo+visitors"]
    end

    subgraph "๐Ÿค– Agent Pool (ReAct Loop)"
        coord["AgentCoordinator<br/>IDLEโ†’PLANNINGโ†’EXECUTINGโ†’<br/>OBSERVINGโ†’REFLECTINGโ†’COMPLETED"]
        guard["Guardrails<br/>IP blocking ยท Risk 0-3 ยท Timeout"]
        A1["Recon"]
        A2["Exploit"]
        A3["Analysis"]
        A4["RedTeam"]
        A5["Social ยท Network ยท Cloud<br/>ICS ยท Mobile ยท Crypto ยท Report"]
    end

    subgraph "๐Ÿ”ง Security Toolkit"
        TOOLS["72+ Tools<br/>nmap ยท masscan ยท nuclei ยท sqlmap ยท metasploit<br/>ffuf ยท gobuster ยท hydra ยท bloodhound<br/>responder ยท amass ยท subfinder ยท trivy<br/>semgrep ยท trufflehog ยท zap ยท nikto ยท burpsuite"]
    end

    WEB & CLI & WA & API --> OR
    OR --> FREE & PAID
    FREE & PAID --> HA
    HA --> OA & QT & ZA & MS & VK & OB & IT
    OA & QT & ZA & MS & VK & OB & IT --> coord
    coord --> guard
    guard --> A1 & A2 & A3 & A4 & A5
    A1 & A2 & A3 & A4 & A5 --> TOOLS
Loading

๐Ÿ”„ CI/CD Pipelines

All pipeline diagrams use Mermaid โ€” rendered automatically by GitHub.

1. ๐Ÿงช Tests Pipeline

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#3fb950', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#3fb950', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#3fb950', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#3fb950', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph LR
    TRIG1["push main/develop"] --> TEST
    TRIG2["pull_request main/develop"] --> TEST
    TRIG3["workflow_dispatch"] --> TEST
    TEST["๐Ÿงช test (matrix 3.11, 3.12)<br/>pytest ยท 43k+ tests"] --> RESULT["โœ… Test Summary"]
    style TEST fill:#3fb950,stroke:#1a7f37,color:#fffffffff
Loading

2. ๐Ÿ“Š Codecov Coverage Pipeline

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#3fb950', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#3fb950', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#3fb950', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#3fb950', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph LR
    TRIG1["pull_request"] --> COV
    TRIG2["workflow_dispatch"] --> COV
    COV["๐Ÿ“Š coverage<br/>pytest --cov=core,agents,api,tools<br/>autonomous,risk_engine,modules,web_ui"] --> UPLOAD["๐Ÿ“ค Upload to Codecov"]
    COV --> ARTIFACT["๐Ÿ“ฆ Upload artifact"]
    COV --> PR["๐Ÿ’ฌ Comment PR"]
    style COV fill:#3fb950,stroke:#1a7f37,color:#fffffffff
Loading

3. ๐Ÿ”’ Security Scan Pipeline

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#f85149', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#f85149', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#f85149', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#f85149', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph TB
    TRIG1["pull_request main/develop"] --> SEC
    TRIG2["schedule daily 6am"] --> SEC
    TRIG3["workflow_dispatch"] --> SEC

    subgraph SEC["๐Ÿ”’ Security Scan"]
        DEP["๐Ÿ“ฆ Dependency Scan<br/>Safety ยท pip-audit"]
        SECRET["๐Ÿ”‘ Secret Detection<br/>TruffleHog ยท GitLeaks ยท GitGuardian"]
        SAST["๐Ÿ” SAST Analysis<br/>Bandit ยท Semgrep"]
        IAC["๐Ÿ—๏ธ IaC Scan<br/>Checkov ยท Trivy Config"]
        SCORE["๐Ÿ“ˆ OSSF Scorecard"]
    end

    DEP --> SUMMARY["๐Ÿ“‹ Security Summary"]
    SECRET --> SUMMARY
    SAST --> SUMMARY
    IAC --> SUMMARY
    SCORE --> SUMMARY
    SAST --> SARIF1["๐Ÿ“Ž Upload Semgrep SARIF"]
    IAC --> SARIF2["๐Ÿ“Ž Upload Checkov SARIF"]
    IAC --> SARIF3["๐Ÿ“Ž Upload Trivy SARIF"]
    SCORE --> SARIF4["๐Ÿ“Ž Upload Scorecard SARIF"]
    DEP --> ART1["๐Ÿ“ฆ Upload Reports"]
Loading

4. โœ… CodeQL Analysis

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#58a6ff', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#58a6ff', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#58a6ff', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#58a6ff', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph LR
    TRIG["schedule weekly Sunday"] --> CQL
    subgraph CQL["CodeQL Advanced"]
        CHECKOUT["๐Ÿ“ฅ Checkout"]
        INIT["โš™๏ธ Initialize CodeQL<br/>security-extended + security-and-quality"]
        BUILD["๐Ÿ”จ Autobuild"]
        ANALYZE["๐Ÿ”ฌ Perform Analysis"]
    end
    CQL --> RES["โœ… SARIF Results"]
Loading

5. ๐Ÿš€ Deploy Pipeline

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#d29922', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#d29922', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#d29922', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#d29922', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph TB
    TRIG1["release published"] --> DEPLOY
    TRIG2["workflow_dispatch staging/prod"] --> DEPLOY

    subgraph DEPLOY["Deploy Pipeline"]
        CHECK["โœ… pre-deploy-check<br/>pytest + bandit"]
        STAGE["๐Ÿงช deploy-staging<br/>staging.pentest.example.com"]
        PROD["๐Ÿš€ deploy-production<br/>pentest.example.com"]
    end

    CHECK --> STAGE
    STAGE --> PROD
    PROD --> SLACK["๐Ÿ“ฌ Notify Slack"]
    CHECK --> SUM["๐Ÿ“‹ deploy-summary"]
    STAGE --> SUM
    PROD --> SUM
Loading

6. ๐Ÿ“ฆ Release Pipeline

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#bc8cff', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#bc8cff', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#bc8cff', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#bc8cff', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph TB
    TRIG["workflow_dispatch<br/>version + prerelease"] --> PRE

    PRE["๐Ÿ“‹ pre-release-checks<br/>version ยท changelog"] --> BUILD
    PRE --> CHLOG["๐Ÿ“ changelog"]
    PRE --> REL["๐Ÿท๏ธ github-release"]

    BUILD["๐Ÿ“ฆ build<br/>python -m build ยท twine"] --> REL
    REL --> PYPI["โฌ†๏ธ pypi-publish<br/>twine upload"]
    REL --> DOCKER["๐Ÿณ docker build & push<br/>ghcr.io ยท amd64 + arm64"]
    REL --> DOCS["๐Ÿ“š docs<br/>mkdocs ยท mkdocs-material"]

    PYPI --> POST["๐Ÿ“ฌ post-release<br/>discussion ยท milestone"]
    DOCKER --> NOTIFY["๐Ÿ”” notify<br/>Slack + Discord"]
    DOCKER --> SUMMARY["๐Ÿ“‹ release-summary"]
    PYPI --> NOTIFY
    PYPI --> SUMMARY
Loading

7. โš™๏ธ CI Pipeline (Legacy)

%%{init: {'theme': 'base', 'themeVariables': { 'background': '#0d1117', 'primaryColor': '#8b949e', 'secondaryColor': '#161b22', 'tertiaryColor': '#0d1117', 'primaryBorderColor': '#8b949e', 'secondaryBorderColor': '#30363d', 'tertiaryBorderColor': '#30363d', 'lineColor': '#8b949e', 'fontSize': '14px', 'fontFamily': '-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif', 'textColor': '#ffffff', 'primaryTextColor': '#ffffff', 'secondaryTextColor': '#ffffff', 'tertiaryTextColor': '#ffffff', 'mainBkg': '#0d1117', 'nodeBorder': '#8b949e', 'clusterBorder': '#30363d', 'clusterBkg': '#161b22', 'titleColor': '#ffffff' }}}%%
graph TB
    TRIG["workflow_dispatch"] --> CI
    subgraph CI["CI Pipeline (Legacy)"]
        T["๐Ÿงช test<br/>matrix 3.10 ยท 3.11 ยท 3.12"]
        L["โœจ lint<br/>black ยท isort ยท flake8 ยท ruff"]
        S["๐Ÿ”’ security-scan<br/>bandit ยท safety"]
    end
    T --> CG["๐Ÿ“Š coverage-gate<br/>check >= 80%"]
    T --> SUM["๐Ÿ“‹ ci-summary"]
    L --> SUM
    S --> SUM
    CG --> SUM
Loading

๐Ÿงช Test Suite

Metric Value Status
Test Files 1,145+ โœ…
Total Tests 43,000+ โœ… Verified
Coverage ~10% โš ๏ธ Improving
Target 80%+ ๐ŸŽฏ Goal
# All tests
pytest tests/ -v

# With coverage
pytest tests/ --cov=. --cov-report=html --cov-report=term

# Unit tests
pytest tests/unit/ -v

# Integration
pytest tests/integration/ -v

# Security
pytest tests/security/ -v

# Exclude slow
pytest tests/ -m "not slow" -v

๐Ÿ›ก๏ธ Security

Built-in Protections

  • โœ… Private IP Blocking: Prevents scanning 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
  • โœ… Loopback Protection: Blocks 127.x.x.x and ::1
  • โœ… Local Domain Filter: Prevents .local, .internal, localhost
  • โœ… Risk Level Control: Restricts tools by safety level (0-3)
  • โœ… Rate Limiting: Prevents abuse

Risk Levels

Level Description Tools
SAFE (0) Recon only whois, dns, subdomain
NORMAL (1) Standard scanning + nmap, nuclei
ELEVATED (2) Light exploitation + sqlmap, exploit
AGGRESSIVE (3) Full exploitation + pivot, lateral

๐Ÿ”ง Configuration

Option 1: Obsidian Vault (Recommended)

bash mcp/obsidian/setup.sh
code ~/Documents/Obsidian\ Vault/Secrets/secrets.yaml

Option 2: Environment Variables

cp .env.example .env
nano .env
source .env

๐Ÿ“ Project Structure

zen-ai-pentest/
โ”œโ”€โ”€ api/                   # FastAPI Backend
โ”œโ”€โ”€ agents/                # AI Agent Implementations
โ”‚   โ”œโ”€โ”€ react_agent.py    # Core ReAct pattern agent (Reasonโ†’Actโ†’Observeโ†’Reflect)
โ”‚   โ”œโ”€โ”€ agent_coordinator_v3.py # Multi-agent workflow engine (11 personas)
โ”‚   โ”œโ”€โ”€ guardrails.py     # IP/Domain/risk-level safety filters
โ”‚   โ””โ”€โ”€ cli/              # CLI tools: deep-recon, deep-exploit, deep-report, deep-audit
โ”œโ”€โ”€ core/                  # Framework Core
โ”œโ”€โ”€ tools/                 # 72+ Security Tool Integrations
โ”œโ”€โ”€ risk_engine/           # Risk Analysis (CVSS, EPSS, false positive detection)
โ”œโ”€โ”€ modules/               # High-Level Modules (exploit, osint, scanners, reporting)
โ”‚   โ”œโ”€โ”€ tool_orchestrator.py  # Integration Bridge for containerized tools
โ”‚   โ”œโ”€โ”€ exploit_modules/   # Auth bypass, command injection, deserialization, SSRF, XSS, XXE, SQLi
โ”‚   โ””โ”€โ”€ osint_modules/    # Cert transparency, DNS enum, email harvester, whois
โ”œโ”€โ”€ mcp/                   # MCP Servers (8 total)
โ”‚   โ”œโ”€โ”€ omni-ai/          # AI chat via OmniRoute proxy
โ”‚   โ”œโ”€โ”€ qterminal/        # Shell + Docker orchestration
โ”‚   โ”œโ”€โ”€ zen-agents/       # 11-agent orchestration
โ”‚   โ”œโ”€โ”€ metasploit/       # Metasploit RPC connector
โ”‚   โ”œโ”€โ”€ vpn-killswitch/   # Connection-loss VPN rotation
โ”‚   โ”œโ”€โ”€ obscura/          # Encrypted secret vault
โ”‚   โ””โ”€โ”€ ip-tracker/       # Visitor IP tracking
โ”œโ”€โ”€ skills/                # 95 Hermes-compatible skills (tool-specific SKILL.md)
โ”‚   โ”œโ”€โ”€ tool-*/           # 39 tool skills (nmap, sqlmap, nuclei, etc.)
โ”‚   โ”œโ”€โ”€ module-*/         # 42 module skills (xss, sqli, osint, etc.)
โ”‚   โ””โ”€โ”€ zen-*/            # 5 framework skills (architecture, agents, workflow)
โ”œโ”€โ”€ web_ui/                # Frontend
โ”‚   โ”œโ”€โ”€ terminal/         # WebShell (FastAPI + PTY over WebSocket + Cloudflare tunnel)
โ”‚   โ”‚   โ”œโ”€โ”€ server.py     # Terminal server with 2FA auth
โ”‚   โ”‚   โ”œโ”€โ”€ static/       # login.html, qr.html (WhatsApp pairing)
โ”‚   โ”‚   โ””โ”€โ”€ Dockerfile
โ”‚   โ”œโ”€โ”€ whatsapp-bot/     # E2E WhatsApp bot (Baileys + /ask AI + /voice TTS)
โ”‚   โ””โ”€โ”€ dashboard/        # React ยท Vite ยท TypeScript
โ”œโ”€โ”€ docker/                # Dockerfiles
โ”‚   โ”œโ”€โ”€ hermes/            # Hermes Agent container
โ”‚   โ”œโ”€โ”€ omniroute/         # OmniRoute API proxy
โ”‚   โ””โ”€โ”€ vpn-proxy/         # VPN proxy container
โ”œโ”€โ”€ database/              # PostgreSQL Models
โ”œโ”€โ”€ reports/               # PDF ยท HTML ยท DOCX Generator
โ”œโ”€โ”€ docker-compose.yml     # 6 services (terminal, whatsapp, omniroute, hermes, vpn, wg)
โ”œโ”€โ”€ opencode.jsonc         # OpenCode config with all 8 MCP servers
โ”œโ”€โ”€ .opencode/agents/      # 267 agent prompt files
โ”œโ”€โ”€ tests/                 # 43,000+ Tests
โ””โ”€โ”€ docs/                  # Documentation

๐Ÿ“š Documentation

Document Description
Architecture Complete system design
API Reference REST + WebSocket endpoints
Installation Docker ยท Local ยท Production
Docker Guide Deployment & configuration
Security Audit Security assessment
Agent Guide AI development partner guide
Benchmarks Performance results
Roadmap 2026 Future plans

๐ŸŒ Community

Platform Link
๐ŸŽฎ Discord discord.gg/zJZUJwK9AC
๐Ÿ™ GitHub github.com/SHAdd0WTAka/Zen-Ai-Pentest
๐ŸŒ Website zen-ai-pentest.pages.dev
๐Ÿ“Š Dashboard live dashboard

QR Code Gallery
๐Ÿ“ฑ Scan QR codes for instant mobile access


๐Ÿค Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

See CONTRIBUTING.md and CODE_OF_CONDUCT.md.


๐Ÿ‘ฅ Authors


@SHAdd0WTAka

Founder ยท Lead Developer

Kimi AI
AI Development Partner

๐Ÿ“„ License

MIT License โ€” see LICENSE.


โš ๏ธ IMPORTANT: For authorized security testing only. Always obtain proper permission before testing any system you do not own.

About

๐Ÿ›กโš”๏ธAI-Powered Penetration Testing Framework with automated vulnerability scanning, multi-agent system, and compliance reporting๐Ÿ›กโš”๏ธ

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

469 stars

Watchers

7 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages