mirror of
https://github.com/CyberSecurityUP/NeuroSploit.git
synced 2026-06-30 07:15:30 +02:00
a5badefc29
Engine:
- Fix: inject IS_SANDBOX=1 so Claude Code's --dangerously-skip-permissions
works under root (real backend runs were exiting rc=1 immediately)
- models: expand to 40 models / 13 providers, tagged CLI vs API
(NVIDIA NIM, DeepSeek, Mistral, Qwen/DashScope, Groq, Together, OpenRouter,
Ollama, Gemini) — Qwen/DeepSeek/Llama usable via API
- backends: on_start callback surfaces the exact argv ("what runs behind it")
- orchestrator: require a Playwright screenshot per confirmed finding; collect
results/activity.json; auto-generate reports after a run
- report.py: HTML always + PDF via Typst engine (.typ source emitted too)
Web dashboard (webgui/, stdlib only — no npm/build):
- Sidebar dashboard (PentAGI-style): Run / Agents / Insights / Reports / Settings
- Multi-target runs; live execution console + per-task activity; finding cards
with screenshots; backend+provider+model pickers (CLI & API)
- Agents tab: browse 213 + add new .md agents from the UI
- Insights: interactive RL-weight + severity charts
- Reports: download/preview PDF + HTML
- Settings/API: execution mode, per-provider API keys, orchestrator, verbosity
- Endpoints: /api/agents (GET/POST), /api/rl, /api/config, /api/reports,
/reports/* + /shots/* static serving
Cleanup: retire replaced web stack (frontend React, FastAPI backend, core
orchestration, old test) to legacy/. Active engine + GUI are fully standalone.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.7 KiB
Python
Executable File
45 lines
1.7 KiB
Python
Executable File
"""
|
|
NeuroSploit v3 - Prompt Model
|
|
"""
|
|
from datetime import datetime
|
|
from typing import Optional, List
|
|
from sqlalchemy import String, Boolean, DateTime, Text, JSON
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from backend.db.database import Base
|
|
import uuid
|
|
|
|
|
|
class Prompt(Base):
|
|
"""Prompt model for storing custom and preset prompts"""
|
|
__tablename__ = "prompts"
|
|
|
|
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=lambda: str(uuid.uuid4()))
|
|
name: Mapped[str] = mapped_column(String(255))
|
|
description: Mapped[Optional[str]] = mapped_column(Text, nullable=True)
|
|
content: Mapped[str] = mapped_column(Text)
|
|
|
|
# Categorization
|
|
is_preset: Mapped[bool] = mapped_column(Boolean, default=False)
|
|
category: Mapped[Optional[str]] = mapped_column(String(100), nullable=True) # pentest, bug_bounty, api, etc.
|
|
|
|
# Parsed vulnerabilities (extracted by AI)
|
|
parsed_vulnerabilities: Mapped[List] = mapped_column(JSON, default=list)
|
|
|
|
# Timestamps
|
|
created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)
|
|
updated_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
|
|
|
def to_dict(self) -> dict:
|
|
"""Convert to dictionary"""
|
|
return {
|
|
"id": self.id,
|
|
"name": self.name,
|
|
"description": self.description,
|
|
"content": self.content,
|
|
"is_preset": self.is_preset,
|
|
"category": self.category,
|
|
"parsed_vulnerabilities": self.parsed_vulnerabilities,
|
|
"created_at": self.created_at.isoformat() if self.created_at else None,
|
|
"updated_at": self.updated_at.isoformat() if self.updated_at else None
|
|
}
|