AI-powered security vulnerability analysis for web pages.
- 🔍 Automated Security Analysis: Scans web pages for potential security vulnerabilities
- 🤖 AI-Powered: Choose between Gemini 2.5 Flash (faster, cheaper) or Gemini 2.5 Pro (advanced, slower)
- 🎨 User-Friendly Interface: Clean, modern popup interface with color-coded results
- 🔒 Privacy-Focused: API key stored locally, no data sent to third parties
- ⚡ Real-Time Analysis: Instant feedback on current page security status
- ⚙️ Flexible Model Selection: Switch between speed/cost and advanced analysis
The extension analyzes web pages for common vulnerabilities including:
- Cross-Site Scripting (XSS) vulnerabilities
- Cross-Site Request Forgery (CSRF) issues
- Insecure forms and data transmission
- Mixed content issues (HTTP resources on HTTPS pages)
- Missing security headers
- Insecure cookie configurations
- Outdated libraries or frameworks
- SQL injection risks
- Insecure redirects
- Information disclosure issues
- OpenRouter API Key: Get your API key from OpenRouter
- Chrome Browser: Version 88 or higher (Manifest V3 support)
- Download/Clone this repository to your local machine
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer Mode (toggle in the top-right corner)
- Click "Load unpacked" and select the
security-scandirectory - Pin the extension to your toolbar for easy access
- Click the Security Scan icon in your Chrome toolbar
- Enter your OpenRouter API Key in the input field
- Select your preferred AI model:
- Gemini 2.5 Flash: Faster analysis, lower cost, good for quick scans
- Gemini 2.5 Pro: More thorough analysis, higher cost, better for comprehensive audits
- Click "Save Settings" to store your preferences securely
- You're ready to start scanning!
- Navigate to any website you want to analyze
- Click the Security Scan icon in your toolbar
- Click "Scan This Page" to start the analysis
- Review the results in the popup:
- ✅ Green: No vulnerabilities found
- 🟡 Yellow: Low severity issues
- 🟠 Orange: Medium severity issues
- 🔴 Red: High severity issues
- 🟣 Purple: Critical severity issues
- Manifest V3: Modern Chrome extension architecture
- Content Scripts: Extract page content for analysis
- Background Service Worker: Handles API communication
- Popup Interface: User interaction and results display
- Service: OpenRouter API
- Models:
- Google Gemini 2.5 Flash (default - faster, cheaper)
- Google Gemini 2.5 Pro (advanced - more thorough, slower, more expensive)
- Analysis: Comprehensive security vulnerability detection
- Response Format: Structured JSON with severity levels
activeTab: Access current tab content for analysisstorage: Store API key securelyhost_permissions: Access OpenRouter API
security-scan/
├── manifest.json # Extension configuration
├── popup.html # Main UI interface
├── popup.css # UI styling
├── popup.js # Popup functionality
├── content.js # Content script
├── background.js # Background service worker
├── convert-icons.sh # SVG to PNG conversion script
├── icons/ # Extension icons
│ ├── icon.svg # Main icon
│ ├── icon16.svg # 16px toolbar icon
│ ├── icon48.svg # 48px management icon
│ ├── icon128.svg # 128px store icon
│ └── README.md # Icon documentation
└── README.md # This file
- Clone the repository
- Load the extension in developer mode
- Make changes to the source files
- Reload the extension in
chrome://extensions/
For development and testing, you'll need:
- OpenRouter account
- API key with credits
- Access to Google Gemini models
"API key not found"
- Ensure you've entered and saved your OpenRouter API key
- Check that the key is valid and has sufficient credits
"Failed to extract page content"
- Some pages may block content extraction
- Try refreshing the page and scanning again
- Check browser console for detailed error messages
"OpenRouter API error"
- Verify your API key is correct and active
- Check your OpenRouter account for credit balance
- Ensure you have access to the Gemini model
If you encounter issues:
- Check the browser console for error messages
- Verify your OpenRouter API key and credits
- Ensure you're on a supported website (some sites may block analysis)
- Local Storage: API keys are stored locally in Chrome's secure storage
- No Data Collection: The extension doesn't collect or store browsing data
- Direct API Calls: Analysis requests go directly to OpenRouter
- Content Limitations: Page content is limited and filtered before analysis
This project is open source. Please review the license file for details.
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
Note: This extension requires an active OpenRouter API key and internet connection to function. Analysis quality depends on the AI model's capabilities and training data.