A professional-grade, CV-ready Python web vulnerability scanner that detects common security issues in web applications. Built with clean architecture, comprehensive documentation, and security best practices.
- 20+ test payloads covering various injection techniques
- Tests both GET and POST parameters
- Detects database-specific errors (MySQL, PostgreSQL, MSSQL, Oracle, SQLite)
- Captures detailed evidence from responses
- Configurable scan intensity
- 20+ XSS payloads including script tags, event handlers, and SVG vectors
- Detects reflected XSS in URL parameters
- Tests HTML form inputs automatically
- Identifies multiple injection contexts
- Configurable payload limits
- Analyzes 7+ critical security headers:
- Strict-Transport-Security (HSTS)
- Content-Security-Policy (CSP)
- X-Frame-Options
- X-Content-Type-Options
- X-XSS-Protection
- Referrer-Policy
- Permissions-Policy
- Detects missing headers
- Identifies weak configurations
- Flags information disclosure (X-Powered-By, Server)
- Provides actionable recommendations
- Beautiful responsive design with modern CSS
- Color-coded severity levels (High/Medium/Low)
- Executive summary with statistics dashboard
- Detailed vulnerability information including:
- Type and description
- Affected URL and parameters
- Test payloads used
- Evidence captured
- Remediation recommendations
- Proper HTML escaping for security
- Multiple scan types: SQL, XSS, Headers, or All
- Configurable timeout for slow servers
- Custom output paths for reports
- Verbose logging mode for debugging
- Color-coded output for readability
- Progress indicators and status updates
- Comprehensive help system
- Separation of concerns - Each scanner is independent
- Modular structure - Easy to extend and maintain
- Reusable components - HTTP client shared across scanners
- Type hints - Better IDE support and maintainability
- Comprehensive docstrings - Every function documented
- Configuration constants - No magic numbers
web-sec-analyzer/
├── scanner/ # Core package
│ ├── __init__.py # Package initialization
│ ├── main.py # CLI interface & orchestration
│ ├── http_utils.py # HTTP client & utilities
│ ├── sql_injection.py # SQL injection scanner
│ ├── xss_scanner.py # XSS vulnerability scanner
│ ├── security_headers.py # Security headers analyzer
│ └── report_generator.py # HTML report generation
├── examples/ # Usage examples
│ ├── README.md # Examples documentation
│ ├── usage_examples.py # Python API examples
│ └── demo_report.py # Demo report generator
├── README.md # Main documentation
├── QUICKSTART.md # Quick reference guide
├── CONTRIBUTING.md # Contribution guidelines
├── SECURITY.md # Security policy
├── CHANGELOG.md # Version history
├── LICENSE # MIT License
├── requirements.txt # Python dependencies
├── setup.py # Package configuration
└── .gitignore # Git ignore rules
-
README.md - Complete project documentation with:
- Feature overview
- Installation instructions
- Usage examples
- Architecture explanation
- Legal disclaimers
-
QUICKSTART.md - Quick reference guide with:
- Common commands
- Python API usage
- Result interpretation
- Troubleshooting tips
-
CONTRIBUTING.md - Developer guide with:
- Development setup
- Code style guidelines
- Pull request process
- Testing requirements
-
SECURITY.md - Security policy with:
- Vulnerability reporting
- Usage best practices
- Legal considerations
- Responsible disclosure
-
CHANGELOG.md - Version history with:
- Feature additions
- Bug fixes
- Breaking changes
-
Examples/ - Working code samples with:
- Python API usage
- Demo report generation
- Real-world scenarios
✅ Read-only operations - Detection without exploitation ✅ Output sanitization - All HTML properly escaped ✅ Timeout protection - Prevents hanging on slow servers ✅ Safe payloads - Non-destructive test data ✅ Error handling - Robust exception management ✅ No data collection - All processing is local
✅ No security vulnerabilities - Passed CodeQL analysis ✅ Type hints - Better code safety ✅ Docstrings - Complete documentation ✅ Error handling - Comprehensive exception coverage ✅ Logging - Proper debug information
- Python Development: Clean, maintainable, professional code
- Web Security: Understanding of OWASP Top 10 vulnerabilities
- HTTP Protocol: Request/response handling, headers, methods
- HTML/CSS: Professional report generation
- CLI Development: User-friendly command-line interface
- Documentation: Comprehensive project documentation
- Testing: Manual validation and quality assurance
- Code Review: Addressed feedback professionally
- Clean Code: Follows PEP 8 and best practices
- Architecture: Modular, extensible design
- Documentation: README, guides, and examples
- Security: Responsible development and disclosure
- Version Control: Git with meaningful commits
- Open Source: MIT license, contribution guidelines
- 7 core Python modules implementing scanner functionality
- 3 comprehensive documentation files (README, QUICKSTART, CONTRIBUTING)
- 3 example scripts demonstrating usage
- 20+ SQL injection payloads for thorough testing
- 20+ XSS payloads covering various attack vectors
- 7+ security headers analyzed
- 0 security vulnerabilities detected by CodeQL
- 100% code review feedback addressed
# Full scan
python -m scanner.main https://example.com
# Specific vulnerability types
python -m scanner.main https://example.com --scan-type sql xss
# Custom configuration
python -m scanner.main https://example.com --timeout 30 --output report.htmlfrom scanner.main import WebSecurityScanner
scanner = WebSecurityScanner("https://example.com")
results = scanner.scan()
report_path = scanner.generate_report()
scanner.close()This project demonstrates:
- Security fundamentals - Understanding of web vulnerabilities
- Professional development - Clean code and documentation
- Python expertise - Advanced language features
- Problem solving - Designing effective security tests
- Communication - Clear documentation and examples
MIT License - See LICENSE file for details
For authorized security testing only. Always obtain written permission before scanning any web application. Unauthorized security testing may be illegal.
✅ COMPLETE - All requirements met:
- SQL injection detection ✓
- XSS vulnerability checking ✓
- Security header analysis ✓
- Professional HTML reports ✓
- Full documentation ✓
- Usage examples ✓
- CV-ready quality ✓
- Security best practices ✓
- Clean code architecture ✓
Built with security in mind | Ready for professional use | Designed for learning