URL Security Scanner by Harshit ChordiyaURL Security Scanner by Harshit Chordiya

URL Security Scanner

Harshit Chordiya

Harshit Chordiya

Security Scanner

An automated, Web security audit tool that crawls a target website, runs security checks across 20+ scanner modules, enhances findings with Google Gemini AI, and presents everything in a real-time dashboard.
Overview
Security Scanner is a production-ready, full-stack security auditing platform built on:
Python + FastAPI — modular backend with isolated API router and WebSocket manager
Google Gemini AI (gemini-3.1-flash-lite-preview) — deep AI-powered analysis and remediation advice per finding
Real-time WebSocket streaming — live scan progress pushed to the browser without polling
Jinja2 templated HTML reports — self-contained, standalone scan reports rendered server-side
Scheduled auto-scan loop — continuous monitoring via a background daemon thread
The scanner performs both passive analysis (headers, cookies, DNS, JWT, SRI, cache control) and active probing (XSS, SQLi, SSRF, open redirect, path discovery, GraphQL introspection) against any target URL.

Architecture

Using the Dashboard

The dashboard has four pages accessible from the left sidebar:

Dashboard

Live metrics: Overall Risk, Total, Critical, High, Medium, Low, Info
AI-generated Executive Summary and Immediate Actions
Severity doughnut chart (Chart.js)
Live scan log preview (WebSocket streamed)

Findings

All findings from the latest scan or any loaded report
Filter bar — All / Critical / High / Medium / Low / Info
Each card shows: severity badge, title, affected location count, category
Expand (▼) to see: Description, Real-World Impact, Technical Details, numbered affected URLs with evidence snippets, Fix Suggestion, code example, OWASP tag, CWE tag

Reports (History)

Last 20 scans sorted newest first
Shows target URL, time, severity badges, overall risk
Click any row to load findings into the Findings view
View Details ↗ opens the full standalone HTML report in a new tab
Delete removes both JSON + HTML report files

Live Log

Full real-time log of every scanner step, pushed via WebSocket
Persists up to 200 lines · scroll-to-bottom on new entries

Sidebar Controls

Control Description Target URL Website to scan Max Pages Crawler page limit Delay (s) Crawl delay between requests Hourly Auto-Scan Toggle background scan loop Run Scan Now Trigger an immediate scan

How the AI Analysis Works

After all scanner modules run, raw findings are sent to Google Gemini in batches of 20:
Gemini enriches each finding with:
Field Description enhanced_severity Re-assessed severity based on real-world exploitability impact Plain-English real-world impact statement technical_details In-depth technical explanation fix_suggestion Specific, copy-paste-ready remediation code_example Working code fix (Nginx config, JS, response headers, etc.) priority Fix order (1 = most urgent) references CVE / CWE / OWASP references
Gemini also produces an executive summary with:
Overall risk level + risk score (0–100)
Top 3 key findings
Top 3 immediate actions
2–3 sentence executive summary
If Gemini is unavailable or rate-limited, the scanner falls back to raw findings gracefully.

Reports

Every completed scan writes two files to reports/:scan_<id>_<timestamp>.json
Full machine-readable report: all findings, occurrences, Gemini enhancements, severity counts, metadata.scan_<id>_<timestamp>.html
Standalone self-contained HTML file rendered from ui/templates/report_template.html via Jinja2:
Metric cards (Overall Risk, Total, Critical, High, Medium, Low, Info, Pages Scanned)
Executive Summary
Key Findings & Immediate Actions (two-column)
Interactive filterable findings with expandable detail panels

Hourly Auto-Scan Loop

The scheduler (agent/scheduler.py) runs in a background daemon thread using the schedule library.
Enable via:
Toggle "Hourly Auto-Scan" in the sidebar UI, or
Set "hourly_scan_enabled": true in config.json
Behaviour:
Runs a full scan every 60 minutes
Progress streams live to all connected WebSocket clients
New findings are merged into the existing history report for the same target — only net-new vulnerabilities are appended, avoiding duplicate noise
Auto-starts on server boot if enabled in config.json
Toggle off at any time from the sidebar.
Like this project

Posted Aug 23, 2026

Developed a web security audit tool with AI-enhanced analysis and real-time dashboards.