How anzouk/phishlens works
PhishLens is a browser extension and server that analyzes email and attachments, then presents a verdict and reasons. The principal flow is a user-initiated Gmail or Outlook scan, proxied by the extension to the backend, which parses the message, runs text, URL and sender checks, fuses results, and returns an explanation. Attachment scanning, history, and optional wrong-verdict reporting are distinct product capabilities. Arrows are limited to README statements and the shown backend call/reference evidence; unsampled implementation links are omitted.
Main entry points: extension_backend.py API orchestration · background.js Request proxy · attachment_analysis.py Attachment analysis · gmail_scan.js Mail scanning
Components 23
Mail extension
- Popup scans
extension/popup/popup.js - Mail scanning
extension/content_scripts/gmail_scan.js - Attachment scans
extension/content_scripts/attachments.js - Request proxy
extension/background.js
Analysis backend
- API orchestration
backend/extension_backend.py - Email parsing
backend/email_parsing.py - Verdict fusion
backend/fusion.py - Result cache
backend/result_cache.py
Detection signals
- Text model
backend/text_model.py - URL and metadata agents
backend/structured_agents.py - Sender trust
backend/sender_trust.py - Auth headers
backend/auth_headers.py - URL reputation
backend/reputation.py - Feature extraction
backend/feature_extraction.py
Attachment inspection
- Attachment analysis
backend/attachment_analysis.py - Archive analysis
backend/archive_analysis.py - Office analysis
backend/office_analysis.py - OCR and QR
backend/ocr.py
History and feedback
- Local scan history
extension/lib/history.js - Verdict reporting
backend/feedback.py
Other components
- Email user
- Gmail / Outlook
- Threat-intelligence feeds
Connections 22
- Email user → Mail scanning: starts scan
README.md - Gmail / Outlook → Mail scanning: provides email
README.md - Email user → Popup scans: submits content
README.md - Mail scanning → Request proxy: requests analysis
extension/background.js - Popup scans → Request proxy: requests analysis
README.md - Attachment scans → Request proxy: requests scan
extension/background.js - Request proxy → API orchestration: proxies API calls
extension/background.js - API orchestration → Email parsing: parses email
backend/extension_backend.py - API orchestration → Text model: scores text
backend/extension_backend.py - API orchestration → URL and metadata agents: scores links and metadata
backend/extension_backend.py - API orchestration → Sender trust: checks sender
backend/extension_backend.py - API orchestration → Auth headers: checks headers
backend/extension_backend.py - API orchestration → URL reputation: checks URLs
backend/extension_backend.py - API orchestration → Verdict fusion: combines scores
backend/extension_backend.py - API orchestration → Result cache: reads and writes
backend/extension_backend.py - API orchestration → Attachment analysis: analyzes attachments
backend/extension_backend.py - Attachment analysis → Archive analysis: dispatches archives
backend/attachment_analysis.py - Attachment analysis → Office analysis: analyzes Office files
backend/attachment_analysis.py - Attachment analysis → OCR and QR: scans images and PDFs
backend/attachment_analysis.py - URL reputation → Threat-intelligence feeds: queries feeds
README.md - Request proxy → Local scan history: saves scan history
extension/background.js - Email user → Verdict reporting: reports verdict
README.md