Files
NeuroSploit/backend/schemas/scan.py
CyberSecurityUP e0935793c5 NeuroSploit v3.2 - Autonomous AI Penetration Testing Platform
116 modules | 100 vuln types | 18 API routes | 18 frontend pages

Major features:
- VulnEngine: 100 vuln types, 526+ payloads, 12 testers, anti-hallucination prompts
- Autonomous Agent: 3-stream auto pentest, multi-session (5 concurrent), pause/resume/stop
- CLI Agent: Claude Code / Gemini CLI / Codex CLI inside Kali containers
- Validation Pipeline: negative controls, proof of execution, confidence scoring, judge
- AI Reasoning: ReACT engine, token budget, endpoint classifier, CVE hunter, deep recon
- Multi-Agent: 5 specialists + orchestrator + researcher AI + vuln type agents
- RAG System: BM25/TF-IDF/ChromaDB vectorstore, few-shot, reasoning templates
- Smart Router: 20 providers (8 CLI OAuth + 12 API), tier failover, token refresh
- Kali Sandbox: container-per-scan, 56 tools, VPN support, on-demand install
- Full IA Testing: methodology-driven comprehensive pentest sessions
- Notifications: Discord, Telegram, WhatsApp/Twilio multi-channel alerts
- Frontend: React/TypeScript with 18 pages, real-time WebSocket updates
2026-02-22 17:59:28 -03:00

90 lines
3.0 KiB
Python
Executable File

"""
NeuroSploit v3 - Scan Schemas
"""
from datetime import datetime
from typing import Optional, List
from pydantic import BaseModel, Field
class AuthConfig(BaseModel):
"""Authentication configuration for authenticated testing"""
auth_type: str = Field("none", description="Auth type: none, cookie, header, basic, bearer")
cookie: Optional[str] = Field(None, description="Session cookie value")
bearer_token: Optional[str] = Field(None, description="Bearer/JWT token")
username: Optional[str] = Field(None, description="Username for basic auth")
password: Optional[str] = Field(None, description="Password for basic auth")
header_name: Optional[str] = Field(None, description="Custom header name")
header_value: Optional[str] = Field(None, description="Custom header value")
class ScanCreate(BaseModel):
"""Schema for creating a new scan"""
name: Optional[str] = Field(None, max_length=255, description="Scan name")
targets: List[str] = Field(..., min_length=1, description="List of target URLs")
scan_type: str = Field("full", description="Scan type: quick, full, custom")
recon_enabled: bool = Field(True, description="Enable reconnaissance phase")
custom_prompt: Optional[str] = Field(None, max_length=32000, description="Custom prompt (up to 32k tokens)")
prompt_id: Optional[str] = Field(None, description="ID of preset prompt to use")
config: dict = Field(default_factory=dict, description="Additional configuration")
auth: Optional[AuthConfig] = Field(None, description="Authentication configuration")
custom_headers: Optional[dict] = Field(None, description="Custom HTTP headers to include")
class ScanUpdate(BaseModel):
"""Schema for updating a scan"""
name: Optional[str] = None
status: Optional[str] = None
progress: Optional[int] = None
current_phase: Optional[str] = None
error_message: Optional[str] = None
class ScanProgress(BaseModel):
"""Schema for scan progress updates"""
scan_id: str
status: str
progress: int
current_phase: Optional[str] = None
message: Optional[str] = None
total_endpoints: int = 0
total_vulnerabilities: int = 0
class ScanResponse(BaseModel):
"""Schema for scan response"""
id: str
name: Optional[str]
status: str
scan_type: str
recon_enabled: bool
progress: int
current_phase: Optional[str]
config: dict
custom_prompt: Optional[str]
prompt_id: Optional[str]
auth_type: Optional[str] = None
custom_headers: Optional[dict] = None
created_at: datetime
started_at: Optional[datetime]
completed_at: Optional[datetime]
error_message: Optional[str]
total_endpoints: int
total_vulnerabilities: int
critical_count: int
high_count: int
medium_count: int
low_count: int
info_count: int
targets: List[dict] = []
class Config:
from_attributes = True
class ScanListResponse(BaseModel):
"""Schema for list of scans"""
scans: List[ScanResponse]
total: int
page: int = 1
per_page: int = 10