-
Notifications
You must be signed in to change notification settings - Fork 88
Add domain squatting detection feature and UI #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Add domain squatting detection feature and UI #120
Conversation
Introduces domain squatting detection to protect against typosquatting, homoglyph, and combosquatting attacks. Updates schema, detection rules, and documentation; adds new protected domains; enhances the options UI with collapsible config sections and domain squatting controls; and integrates the detector module into the background script. We have also tuned the re-scan amount and triggers to be more aggressive since the performance of the page scanning is much better now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces comprehensive domain squatting detection to protect users from typosquatting, homoglyph substitution, and combosquatting attacks. The feature uses four detection algorithms (Levenshtein distance, homoglyph detection, typosquatting patterns, and combosquatting) to identify suspicious domains that closely resemble legitimate sites.
Key Changes:
- Adds a new
DomainSquattingDetectormodule with multiple detection algorithms - Integrates domain squatting checks into the content script's protection flow, running before phishing detection
- Updates scan timing parameters to be more aggressive (MAX_SCANS increased from 5 to 8, SCAN_COOLDOWN reduced from 1200ms to 800ms)
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/modules/domain-squatting-detector.js |
New module implementing domain squatting detection with Levenshtein, homoglyph, typosquat, and combosquat algorithms |
scripts/content.js |
Integrates domain squatting detection, adjusts scan timing/frequency, adds domain squatting warning banners |
scripts/background.js |
Initializes domain squatting detector, handles check_domain_squatting messages |
scripts/blocked.js |
Adds domain squatting-specific display logic and technical details |
options/options.js |
Implements collapsible config sections UI, adds domain squatting webhook configuration |
options/options.html |
Adds webhook checkbox for domain squatting events, moves inline scripts to options.js |
options/options.css |
Adds styles for collapsible sections and expandable lists |
rules/detection-rules.json |
Defines domain squatting configuration with 30+ protected domains |
config/managed_schema.json |
Adds schema for domain squatting policy management |
docs/features/domain-squatting-detection.md |
New comprehensive documentation for the feature |
docs/settings/detection-rules.md |
Updates to explain dual protection of URL allowlist |
docs/SUMMARY.md |
Adds Features section with domain squatting documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Zacgoose <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Zacgoose <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Zacgoose <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Zacgoose <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Zacgoose <[email protected]>
Introduces domain squatting detection to protect against typosquatting, homoglyph, and combosquatting attacks.
Updates schema, detection rules, and documentation; adds new protected domains; enhances the options UI with collapsible config sections and domain squatting controls; and integrates the detector module into the background script.
We have also tuned the re-scan amount and triggers to be more aggressive since the performance of the page scanning is much better now