A Python CLI tool for automated web vulnerability scanning (MPA & SPA) with AI-generated security reporting for executives, developers, and security teams.
Modern web applications frequently contain security vulnerabilities such as SQL Injection (SQLi), Cross-Site Scripting (XSS), Cross-Site Request Forgery (CSRF), server misconfigurations, and information disclosure weaknesses. Identifying these vulnerabilities often requires multiple specialized tools and extensive manual effort from penetration testers and developers.
Existing vulnerability scanners typically generate highly technical outputs that can be difficult for developers, students, and non-security stakeholders to interpret. Additionally, many tools focus only on specific vulnerability classes and do not provide unified workflows for reconnaissance, exploitation, and reporting.
As web applications continue to grow in complexity, there is a need for an automated and centralized security assessment platform capable of discovering application attack surfaces, performing repeatable vulnerability testing, and generating human-readable reports with actionable remediation guidance.
This project addresses these challenges through the development of an AI-assisted web vulnerability scanner that combines automated crawling, browser automation, vulnerability detection, network reconnaissance, and intelligent report generation into a single unified framework.
VulnerabilityScanner is a Python-based command-line tool that combines automated crawling, browser automation via Playwright, and AI-driven report generation to deliver comprehensive web application security assessments.
The scanner targets several high-impact vulnerability classes:
- SQL Injection (SQLi)
- Cross-Site Scripting (XSS)
- Cross-Site Request Forgery (CSRF)
- Server misconfigurations and information disclosure
- Network-level weaknesses via Nmap port and service scanning
The tool auto-detects whether the target is a traditional multi-page application (MPA) or a modern Single Page Application (SPA), then selects the appropriate scanning strategy. All findings are exported as structured JSON, which are then passed to an AI language model to generate detailed, human-readable security reports complete with vulnerability descriptions, severity ratings, and prioritized remediation guidance.
- Auto-detection of SPA vs traditional web apps
- Authenticated scanning — automatically finds and submits login forms, extracts JWT tokens
- Browser automation with Playwright for SPAs
- Nmap-based network reconnaissance and vulnerability detection
- Exploit chain execution for traditional apps
- AI-generated reports accessible to developers, security teams, and executives
- All output saved as structured JSON for auditability and reuse
| Category | Technology |
|---|---|
| Language | Python 3 |
| Browser Automation | Playwright (Chromium) |
| HTTP Requests | requests |
| HTML Parsing | BeautifulSoup4 |
| Network Scanning | Nmap |
| AI Report Generation | Gemini API |
| Report Rendering | HTML |
| Containerization | Docker |
git clone https://github.com/comp596-spring-2026/VulnerabilityScanner.git
cd VulnerabilityScannerpython3 -m venv venv
source venv/bin/activate # Linux / Maccd scannerpip install -r requirements.txt
brew install nmap netcat curl mysql-client # Macplaywright install chromiumDocker is required to run the example target apps below:
Download and install from: https://www.docker.com/products/docker-desktop/
This project uses the Gemini API to generate AI-powered security reports. You will need a free API key from Google.
- Go to https://aistudio.google.com/apikey
- Sign in with your Google account
- Click Create API Key
- Copy the key and create a
.envfile in thescanner/directory:
GEMINI_API_KEY=your_api_key_hereecho ".env" >> .gitignorepython3 main.py <target_url> --username <your_username> --password <your_password>docker run --rm -it -p 8080:80 vulnerables/web-dvwaThis runs DVWA locally at http://localhost:8080
Open your browser and go to http://localhost:8080/setup.php, click Create / Reset Database, then navigate to http://localhost:8080/login.php
| Field | Value |
|---|---|
| Username | admin |
| Password | password |
source venv/bin/activate
cd scanner
python3 main.py http://localhost:8080 --username admin --password passworddocker pull bkimminich/juice-shopdocker run --rm -p 3000:3000 bkimminich/juice-shopOpen your browser and navigate to http://localhost:3000
Unauthenticated:
source venv/bin/activate
cd scanner
python3 main.py http://localhost:3000/#/Authenticated:
python3 main.py http://localhost:3000/#/ --username admin@juice-sh.op --password admin123This tool is intended for authorized security testing only.
