Home
Softono
Zen-Ai-Pentest

Zen-Ai-Pentest

Open source MIT Python
391
Stars
67
Forks
30
Issues
5
Watchers
1 week
Last Commit

About Zen-Ai-Pentest

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

Platforms

Web Self-hosted

Languages

Python

Zen-AI-Pentest

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

Tests Coverage Coveralls 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

โœจ 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

๐Ÿš€ Quick Start

๐Ÿณ Docker (Recommended)

git clone https://github.com/SHAdd0WTAka/zen-ai-pentest.git
cd zen-ai-pentest
cp .env.example .env
docker-compose up -d
Service Port
Dashboard :3000
API Docs :8000/docs
API :8000

๐Ÿ“ฆ 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 Personas

bash api/QUICKSTART.sh
source tools/setup_aliases.sh
k-recon "Target: example.com"
k-exploit "Write SQLi scanner"
k-chat

๐Ÿ–ฅ๏ธ VM Setup

python scripts/setup_vms.py --kali
# See docs/setup/VIRTUALBOX_SETUP.md

๐Ÿ’ป 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

๐Ÿ”„ 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

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

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"]

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"]

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

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

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

๐Ÿงช 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
โ”‚   โ”œโ”€โ”€ main.py           # API server ยท routes ยท middleware
โ”‚   โ”œโ”€โ”€ auth.py           # JWT authentication ยท RBAC
โ”‚   โ””โ”€โ”€ websocket.py      # Real-time scan updates
โ”œโ”€โ”€ agents/                # AI Agent Implementations
โ”‚   โ”œโ”€โ”€ react_agent.py    # Core ReAct pattern agent
โ”‚   โ”œโ”€โ”€ react_agent_vm.py # VM-backed agent
โ”‚   โ””โ”€โ”€ personas/         # 11 specialized AI personas
โ”œโ”€โ”€ core/                  # Framework Core
โ”‚   โ”œโ”€โ”€ orchestrator.py   # Workflow orchestration
โ”‚   โ”œโ”€โ”€ models.py         # Data models
โ”‚   โ””โ”€โ”€ cache.py          # Multi-tier caching
โ”œโ”€โ”€ tools/                 # 72+ Security Tools
โ”‚   โ”œโ”€โ”€ nmap/             # Network scanning
โ”‚   โ”œโ”€โ”€ nuclei/           # Vulnerability detection
โ”‚   โ”œโ”€โ”€ sqlmap/           # SQL injection
โ”‚   โ”œโ”€โ”€ metasploit/       # Exploitation framework
โ”‚   โ””โ”€โ”€ ...               # 68+ more integrations
โ”œโ”€โ”€ risk_engine/           # Risk Analysis
โ”‚   โ”œโ”€โ”€ cvss.py           # CVSS scoring
โ”‚   โ”œโ”€โ”€ epss.py           # EPSS probability
โ”‚   โ””โ”€โ”€ false_positive_engine.py  # Bayesian filtering
โ”œโ”€โ”€ modules/               # High-Level Modules
โ”‚   โ”œโ”€โ”€ scanner/          # Automated scanning
โ”‚   โ””โ”€โ”€ exploit_modules/  # Exploit validation
โ”œโ”€โ”€ web_ui/                # Frontend
โ”‚   โ”œโ”€โ”€ frontend/         # React ยท Vite ยท TypeScript
โ”‚   โ””โ”€โ”€ dashboard/        # Analytics dashboard
โ”œโ”€โ”€ database/              # PostgreSQL Models
โ”œโ”€โ”€ reports/               # PDF ยท HTML ยท DOCX Generator
โ”œโ”€โ”€ docker/                # Docker Compose ยท Dockerfiles
โ”œโ”€โ”€ tests/                 # 43,000+ Tests
โ”‚   โ”œโ”€โ”€ unit/             # Component tests
โ”‚   โ”œโ”€โ”€ integration/      # E2E workflows
โ”‚   โ””โ”€โ”€ security/         # SAST/DAST validation
โ””โ”€โ”€ 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.