Spaces:
Running on CPU Upgrade
title: SentinelScan WSS
emoji: π‘οΈ
colorFrom: indigo
colorTo: red
sdk: docker
pinned: true
π‘οΈ SentinelScan β Website Security Scanner (WSS) by larxius
SentinelScan is a full-stack, enterprise-grade Dynamic Application Security Testing (DAST) platform designed to automate vulnerability detection across target domains and web APIs. Featuring a highly modular architecture, SentinelScan orchestrates a pipeline of custom security scanning agents concurrently, storing findings in a structured database and presenting them in a premium, real-time dashboard.
π Key Features
- Multi-Agent Concurrency: Uses an asynchronous thread pool execution model (
ThreadPoolExecutor) inside Celery tasks to run up to 17 specialized scanner modules in parallel. - Real-time Log Streaming: Captures and exposes live, color-coded execution logs in-memory, enabling users to monitor active scans line-by-line.
- Scheduled Scans: Leverage Celery Beat to automate recurring scans (daily, weekly, monthly) for regular status monitoring.
- Alert Webhooks: Automatically dispatches security alerts to external services (e.g., Discord, custom webhooks) when critical or high vulnerabilities are discovered.
- Authenticated Scanning: Supports credentials/cookies injection via custom HTTP request headers, bypassing login perimeters to test deep backend routes.
- Interactive Remediation: Offers interactive, language-specific code remediation templates for each identified vulnerability type.
- Dynamic PDF Reports: Generates professional PDF summaries of completed scans, containing detailed risk score matrices and remediation guidelines.
π Directory Structure
Project-WSS/
βββ backend/ # Flask Backend Application
β βββ app/ # Main Flask Application Package
β β βββ routes/ # REST API Endpoints & Route Blueprints
β β β βββ auth.py # User Authentication (Login, Register)
β β β βββ reports.py # PDF Generation and Scan Reports
β β β βββ scans.py # Scan Configuration, Triggering, Logs
β β β βββ vulnerabilities.py # Remediation & Vulnerability Queries
β β βββ scanners/ # Security Engine Modules & Core Pipelines
β β β βββ __init__.py # Pipeline Definitions and Class Dispatcher
β β β βββ api_scanner.py # Exposed REST API Route Finder
β β β βββ base_scanner.py # Abstract Base Class and Shared Log Utilities
β β β βββ cloud_scanner.py # Public S3/Cloud Storage Auditor
β β β βββ cors_scanner.py # CORS Misconfigurations Tester
β β β βββ cve_scanner.py # Vulnerability Database Version Matcher
β β β βββ directory_scanner.py# Directory/File brute-forcer
β β β βββ fuzzer_scanner.py # SQLi & XSS Parameter Fuzzer
β β β βββ headers_scanner.py # HTTP Security Headers & Cache Poisoning
β β β βββ nmap_scanner.py # Port & Service Banner Scanner (via Nmap)
β β β βββ nuclei_scanner.py # Nuclei Template-based Scanner
β β β βββ robots_scanner.py # robots.txt Crawler
β β β βββ secrets_scanner.py # Page Secrets/API Key Scanner
β β β βββ sslyze_scanner.py # SSL/TLS Configurations & Ciphers Auditor
β β β βββ subdomain_scanner.py# Subdomain DNS Enumerator
β β β βββ tech_scanner.py # Technology Stack Fingerprinting
β β β βββ waf_scanner.py # WAF Detection & Fingerprinting
β β β βββ whois_scanner.py # Domain Registrar and Whois Lookup
β β β βββ zap_scanner.py # OWASP ZAP Active Spider Integration
β β βββ utils/ # Utility Scripts & Helpers
β β β βββ pdf_generator.py # ReportLab PDF Generation
β β β βββ webhook.py # Discord & Webhook Dispatcher
β β βββ database.py # SQLAlchemy Extension Instance
β β βββ extensions.py # Rate Limiter & Security Extensions
β β βββ models.py # SQLAlchemy Database Models (SQLite/PostgreSQL)
β β βββ scanner.py # Celery Tasks, Beat Schedules & Orchestration
β βββ celery_app.py # Celery Broker and Beat Scheduler Configuration
β βββ config.py # Environment Variable Parsing and App Constants
β βββ requirements.txt # Python Dependencies List
β βββ run.py # Flask Application Startup Launcher
β βββ .env # Local Environment Secret Key Configurations
β
βββ frontend/ # React Frontend Application (Vite-powered SPA)
β βββ src/ # React Application Source
β β βββ assets/ # SVGs, Fonts, and Static UI Elements
β β βββ components/ # Reusable UI Components
β β β βββ AuthContext.jsx # Global JWT Login State & API Interceptor
β β β βββ CodeBlock.jsx # Syntax-highlighted Remediation Viewer
β β β βββ Layout.jsx # Dashboard App Shell & Navigation Sidebar
β β β βββ ProtectedRoute.jsx # Auth Check Router Wrapper
β β β βββ ThreatGauge.jsx # SVG Semi-circle Security Score Indicator
β β βββ pages/ # Top-level Routing View Pages
β β β βββ Dashboard.jsx # Overview, Scan Metrics, and Status Cards
β β β βββ LandingPage.jsx # Modern Dark Mode Promotional Marketing Page
β β β βββ Login.jsx # Clean Secure Authentication Portal
β β β βββ NewScan.jsx # Target, Pipeline and Cookie Configurations
β β β βββ Register.jsx # Account Creation Portal
β β β βββ ReportsHistory.jsx # Past Scan Lists and Export Center
β β β βββ ScanResults.jsx # Vulnerability breakdown & Live terminal logs
β β β βββ Settings.jsx # Notification threshold & webhook configuration
β β βββ App.css # Main Layout styling
β β βββ App.jsx # Routing configuration
β β βββ index.css # Global theme tokens, inputs, animations
β β βββ main.jsx # DOM Injection root
β β βββ mockApi.js # Standalone local frontend mock testing DB
β β βββ theme.css # Precision Sentinel palette values
β βββ vite.config.js # React Hot Module Reloading server options
β βββ package.json # Frontend NPM scripts & dependencies
β
βββ docker-compose.yml # Multi-container orchestrator (Redis service)
ποΈ System Architecture
graph TD
User([Security Auditor]) -->|Browser| FE[React Frontend SPA]
FE -->|API Requests| BE[Flask Web Backend]
BE -->|Store Scans/Vulns| DB[(SQLite / PostgreSQL)]
BE -->|Enqueue Jobs| Redis[(Redis Broker)]
Celery[Celery Task Workers] -->|Dequeue Jobs| Redis
Celery -->|Write Live Logs| MemLog[(In-Memory Logs)]
Celery -->|Execute Scanners Concurrently| Scanners{Scanner Suite}
Scanners -->|Target Requests| Target[Target System]
Scanners -->|Persist Findings| DB
Celery -->|Trigger Alert| Webhook[Webhook Notification]
Backend Components
- Flask (REST API): Exposes endpoints for managing accounts, starting scans, listing results, downloading PDFs, and tracking setting updates.
- Celery Worker: Dequeues scan tasks and runs them asynchronously.
- ThreadPoolExecutor: Multi-threads individual scanners inside a Celery task.
- Celery Beat: Runs continuously to process scheduled periodic scans.
- Redis: Acts as the fast in-memory message broker.
ποΈ Database Schema
The database schema, defined in backend/app/models.py, includes five main tables:
User: Manages credential hashing (viabcrypt) and session links.Scan: Details the target domain, scan mode (Quick, Standard, Deep), authorization headers, overall security score, scan status, and timings.Vulnerability: Stores findings linked to a scan. Contains details like CVSS score, severity classification, category, description, and copy-pasteable remediation snippets.ScheduledScan: Saves user-configured scanning intervals (daily, weekly, monthly) for targets.AlertSettings: Manages notification flags, webhook URL destinations, and minimum severity thresholds.
βοΈ Scan Pipelines
Pipeline routes are configured in backend/app/scanners/__init__.py. Depending on the target criticality and scan duration limits, auditors choose between:
| Pipeline | Target Speed | Underlying Scanner Suite | Description |
|---|---|---|---|
Quick |
~30 seconds | Headers, Nmap (top 100 ports), SSLyze, Tech stack, WHOIS, WAF | Surface audit for standard misconfigurations |
Standard |
~2β3 minutes | Quick + SQLi/XSS Fuzzer, Subdomains, API pathways, Cloud, Secrets, CVEs | Comprehensive assessment of application business logic |
Deep |
~10β15 minutes | Standard + CORS, robots.txt, Directory brute-force, Nuclei, ZAP (active) | Deep crawling and automated vulnerability exploitation |
SSL |
~15 seconds | SSLyze, Headers | SSL certificate validation and cipher security audit |
Port |
~45 seconds | Nmap (standard 1000 ports) | Port and network service banner reconnaissance |
π οΈ The Scanner Suite (17 Specialized Modules)
Each scanner inherits from BaseScanner (backend/app/scanners/base_scanner.py) which coordinates logging, domain parsing, and vulnerability formatting:
- Headers Scanner (
headers_scanner.py): Checks HTTP security headers (HSTS, CSP, CORS, X-Frame-Options, permissions, Referrer policy) and runs a custom check for HTTP host parameter cache poisoning. - Nmap Scanner (
nmap_scanner.py): Firesnmapcommands directly via sub-process, checking exposed network services and testing for vulnerabilities using script scanning banners. - SSLyze Scanner (
sslyze_scanner.py): Audits SSL certificates, verifying trust status, expiration, and highlighting weak legacy protocols (TLS 1.0, SSLv3). - Tech Scanner (
tech_scanner.py): Fingerprints backend technologies, libraries, servers, and frameworks. - Whois Scanner (
whois_scanner.py): Looks up registrar information, IP ownership, and registration details. - WAF Scanner (
waf_scanner.py): Detects the presence of firewalls (Cloudflare, AWS WAF, ModSecurity, etc.) by inspecting response indicators. - CORS Scanner (
cors_scanner.py): Audits cross-origin resource sharing declarations to prevent credential leaks. - Robots Scanner (
robots_scanner.py): Parses targetrobots.txtentries to extract hidden directories or disallowed routes. - Directory Scanner (
directory_scanner.py): Brute-forces directories using wordlists to discover hidden panels (/admin,/phpmyadmin,/api/v1). - Fuzzer Scanner (
fuzzer_scanner.py): Performs automated query parameter fuzzing, validating parameters against Cross-Site Scripting (XSS) and SQL Injection (SQLi) patterns. - API Scanner (
api_scanner.py): Maps routing interfaces, documenting open APIs and JSON payloads. - Cloud Scanner (
cloud_scanner.py): Audits exposed public storage assets (AWS S3 Buckets, Azure Blobs, etc.). - Secrets Scanner (
secrets_scanner.py): Scrapes source HTML code for exposed keys, AWS access IDs, and connection credentials. - CVE Scanner (
cve_scanner.py): Cross-references identified technology versions against public vulnerability registries. - Nuclei Scanner (
nuclei_scanner.py): Performs targeted scans using ProjectDiscovery's template engine. - ZAP Scanner (
zap_scanner.py): Coordinates deep active spider scanning via the OWASP ZAP API integration. - CORS/API Helper Scanners: Secondary scanners focused on validation and authorization testing.
π Setup & Local Execution
Prerequisites
- Python 3.10+
- Node.js v18+
- Nmap (must be added to system
PATHenvironment variables) - Redis (running locally on port
6379)
Step 1: Start Redis
You can run Redis using Docker:
docker-compose up -d
Step 2: Configure and Start Backend
- Navigate to the backend directory:
cd backend - Create a virtual environment and activate it:
python -m venv venv # On Windows: venv\Scripts\activate # On Unix/macOS: source venv/bin/activate - Install dependencies:
pip install -r requirements.txt - Verify your
.envconfiguration. Ensure the keys and configurations are correct. - Seed the database and start the API server:
The Flask application will start onpython run.pyhttp://127.0.0.1:5000.
Step 3: Launch Celery Workers & Beat
Keep your backend running, open two new terminal sessions (with the virtual environment activated), and run:
- Celery Task Worker:
celery -A celery_app.celery worker --loglevel=info - Celery Beat Scheduler:
celery -A celery_app.celery beat --loglevel=info
Step 4: Configure and Run Frontend
- Navigate to the frontend directory:
cd ../frontend - Install npm modules:
npm install - Start the Vite development server:
The frontend application will boot onnpm run devhttp://localhost:5173.
π§ͺ Seeding and Testing
On the first initialization, the database is pre-seeded with a default user and dummy mock security scan data so you can preview the platform immediately:
- Mock Account Email:
admin@gmail.com - Mock Account Password:
admin123
You can log in with these credentials, explore the interactive remediation code windows, trigger new scans, check your live-updating terminal dashboard logs, and download auto-generated PDF reports directly from the history view.