Open-source tool to check website security headers and detect exposed API keys
Automated security checker for exposed API keys, weak headers, and common vulnerabilities.
A lightweight Python script that scans websites for:
- Exposed API keys (Stripe, AWS, OpenAI, etc.)
- Missing security headers (CSP, HSTS, X-Frame-Options)
- Insecure configurations
- Common OWASP vulnerabilities
Perfect for bug bounty hunters, security researchers, and developers who want to quickly audit a site before launch.
# Clone the repo
git clone https://github.com/CyberCheckerdev/api-security-header-scanner.git
cd api-security-header-scanner
# Install dependencies
pip install requests beautifulsoup4
# Run scan
python scanner.py https://example.com- ✅ Content-Security-Policy (CSP)
- ✅ Strict-Transport-Security (HSTS)
- ✅ X-Frame-Options (Clickjacking protection)
- ✅ X-Content-Type-Options
- ✅ X-XSS-Protection
- ✅ Referrer-Policy
Detects exposed keys for:
- Stripe (
sk_live_,pk_live_) - AWS (
AKIA,aws_access_key) - OpenAI (
sk-proj-) - Google Maps, SendGrid, Twilio, and 20+ more services
- Mixed content warnings (HTTP resources on HTTPS)
- Directory listing enabled
- Exposed
.envand.gitfiles - Weak SSL/TLS configuration
🔍 Scanning: https://example.com
✅ HTTPS: Enabled
✅ HSTS: max-age=31536000
❌ CSP: Missing (High Risk)
❌ X-Frame-Options: Missing (Clickjacking Risk)
🔑 API Keys Found:
❌ Stripe Live Key: sk_live_51Hxxx... (Line 42 in main.js)
❌ AWS Access Key: AKIAI5xxx... (Exposed in HTML)
⚠️ Configuration Issues:
❌ .env file publicly accessible
✅ robots.txt configured correctly
Security Score: 4/10 (Critical Issues Found)
This script provides a quick manual check, but for continuous monitoring, automated scanning, and compliance reports, check out:
👉 CyberChecker.com — Full security audit in 60 seconds
Features the open-source scanner doesn't have:
- Real-time monitoring (alerts when new vulnerabilities appear)
- Supabase RLS policy checker
- WordPress plugin vulnerability database
- Compliance reports (GDPR, OWASP Top 10)
- Historical tracking (see security improvements over time)
- API for CI/CD integration
Free tier available — no credit card required.
- Python 3.7+
requestslibrarybeautifulsoup4library
pip install -r requirements.txtpython scanner.py https://yourwebsite.compython scanner.py https://yourwebsite.com --output json > report.jsonpython scanner.py --file urls.txtPull requests are welcome! For major changes, please open an issue first.
Areas where contributions are needed:
- Additional API key patterns
- More security header checks
- CMS-specific vulnerability checks (WordPress, Drupal, etc.)
- Performance optimizations
MIT License - See LICENSE file
This tool is for educational and authorized security testing only. Only scan websites you own or have explicit permission to test. Unauthorized scanning may be illegal in your jurisdiction.
- Website: CyberChecker.com
- Blog: Security Guides & Tutorials
- Issues: Report bugs or request features
- Awesome Security Tools
- Bug Bounty Tools List
- InfoSec Resources 2026
Built with ❤️ for the security community