A lightweight, efficient Python command-line utility designed to perform fast security audits on web applications. It analyzes target URLs for missing HTTP security headers, evaluates cookie configurations, and detects potential directory or configuration exposure.
Features • Installation • Usage • Project Structure • Contributing
- 🛡️ HTTP Security Headers Audit: Detects missing defensive headers such as
Content-Security-Policy,X-Content-Type-Options, andStrict-Transport-Security. - 🍪 Cookie Security Audit: Validates if cookies are issued with vital protective flags (
Secure,HttpOnly,SameSite). - 📂 Directory Reconnaissance: Checks for exposed sensitive directories or common configuration leaks.
- ⚡ Fast & Lightweight: Built using standard Python modules and minimal external dependencies.
Make sure you have Python 3.8+ and pip installed on your system.
-
Clone the repository:
git clone https://github.com cd py-secure-scanner -
Install dependencies:
pip install -r requirements.txt
Run the scanner directly from your terminal by providing the target website URL as an argument:
python scanner.py https://example.com🔍 Starting Python security scan for: https://google.com...
✅ Target responded successfully. Analyzing vulnerabilities...
🛡️ HTTP Security Headers Audit:
[- ] Missing Security Header: Content-Security-Policy
[- ] Missing Security Header: X-Content-Type-Options
[- ] Missing Security Header: Strict-Transport-Security
🍪 Cookie Security Audit:
[+] Cookies look secure or none detected.
📂 Directory Reconnaissance Audit:
[+] No sensitive directories or configuration leaks exposed.
🏁 Scan completed.
py-secure-scanner/
│
├── scanner.py # Main scanner orchestrator and CLI entry point
├── cookies.py # Module handling Cookie Security logic and validation
├── requirements.txt # Project dependencies (requests)
└── README.md # Project documentation
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
This tool is intended strictly for educational and authorized security testing purposes. Running web scanners against targets without prior explicit written permission is illegal. The author holds no liability for misuse or damages caused by this program.