How edda1011/cyberfish works
CyberFish is a phishing-analysis web app. Users submit a URL or email for server-side analysis, or decode a QR image locally and optionally send its decoded HTTP(S) link for URL analysis. The URL endpoint combines local checks with DNS, registration-age, and reputation results; the email endpoint combines local text, header, and attachment findings, with optional Gemini assistance. Results show a risk score, evidence, and recommended actions. The graph follows documented routes and sampled imports/calls; unsampled implementations are represented only where README capabilities establish their role.
Main entry points: url/route.ts URL endpoint · email/route.ts Email endpoint · email-analyzer.tsx Email analyzer · analyzer-switcher.tsx Analyzer switcher
Components 26
User interface
- Analyzer switcher
app/components/analyzer-switcher.tsx - Email analyzer
app/components/email-analyzer.tsx - URL analyzer
app/components/url-analyzer.tsx - QR analyzer
app/components/qr-analyzer.tsx - QR decoder
lib/qr-image.ts - Results view
app/components/analysis-result.tsx
Email analysis
- Email endpoint
app/api/analyze/email/route.ts - Local email rules
lib/analyze-email.ts - EML parser
lib/eml-file.ts - Header analysis
lib/email-header-analysis.ts - Attachment assessment
lib/attachment-analysis.ts - AI result merge
lib/email-ai.ts - Gemini analysis
lib/gemini-email.ts
URL analysis
- URL endpoint
app/api/analyze/url/route.ts - Local URL rules
lib/analyze-url.ts - DNS safety
lib/dns-safety/dns-safety.ts - Domain registration
lib/domain-registration/rdap.ts - Safe Browsing
lib/threat-intelligence/google-safe-browsing.ts - DNS result merge
lib/merge-dns-safety.ts - Registration merge
lib/merge-domain-registration.ts - Reputation merge
lib/merge-threat-intelligence.ts
Shared services
- Rate limiting
lib/rate-limit.ts - Security logging
lib/security-log.ts
Other components
- User
- Google Safe Browsing
- Google Gemini
Connections 34
- User → Analyzer switcher: chooses analyzer
- Analyzer switcher → Email analyzer: shows
app/components/analyzer-switcher.tsx - Analyzer switcher → URL analyzer: shows
app/components/analyzer-switcher.tsx - Analyzer switcher → QR analyzer: shows
app/components/analyzer-switcher.tsx - Email analyzer → EML parser: parses file
app/components/email-analyzer.tsx - Email analyzer → Attachment assessment: assesses metadata
app/components/email-analyzer.tsx - Email analyzer → Email endpoint: submits email
README.md - URL analyzer → URL endpoint: submits URL
README.md - QR analyzer → QR decoder: decodes locally
app/components/qr-analyzer.tsx - QR analyzer → URL endpoint: submits chosen link
app/components/qr-analyzer.tsx - Email endpoint → Local email rules: runs local analysis
app/api/analyze/email/route.ts - Email endpoint → Gemini analysis: requests optional AI
app/api/analyze/email/route.ts - Email endpoint → AI result merge: merges AI result
app/api/analyze/email/route.ts - Local email rules → Local URL rules: checks extracted links
lib/analyze-email.ts - Local email rules → Header analysis: analyzes signals
lib/analyze-email.ts - Local email rules → Attachment assessment: analyzes metadata
lib/analyze-email.ts - EML parser → Header analysis: extracts signals
lib/eml-file.ts - EML parser → Attachment assessment: extracts metadata
lib/eml-file.ts - Gemini analysis → Google Gemini: calls provider
- URL endpoint → Local URL rules: runs local analysis
app/api/analyze/url/route.ts - URL endpoint → DNS safety: checks hostname
app/api/analyze/url/route.ts - URL endpoint → Domain registration: checks domain
app/api/analyze/url/route.ts - URL endpoint → Safe Browsing: checks URL
app/api/analyze/url/route.ts - URL endpoint → DNS result merge: merges DNS result
app/api/analyze/url/route.ts - URL endpoint → Registration merge: merges registration
app/api/analyze/url/route.ts - URL endpoint → Reputation merge: merges reputation
app/api/analyze/url/route.ts - Safe Browsing → Google Safe Browsing: queries reputation
README.md - Email endpoint → Rate limiting: limits requests
app/api/analyze/email/route.ts - Email endpoint → Security logging: logs outcomes
app/api/analyze/email/route.ts - URL endpoint → Rate limiting: limits requests
app/api/analyze/url/route.ts - URL endpoint → Security logging: logs outcomes
app/api/analyze/url/route.ts - Email analyzer → Results view: renders findings
app/components/email-analyzer.tsx - URL analyzer → Results view: renders findings
app/components/url-analyzer.tsx - QR analyzer → Results view: renders link findings
app/components/qr-analyzer.tsx