Skip to content

DipesThapa/safebrowse-ai

SafeBrowse — Privacy-first Web Safety Extension

CI CodeQL Release License: MIT

SafeBrowse is a lightweight, on-device browser extension that helps families, schools, and workplace teams reduce exposure to harmful content without compromising privacy. Built and maintained by CyberHeroez CIC.

Features

  • Advanced heuristics: weighted URL/title/meta/body scoring with sensitivity control
  • On-page protection: optional Aggressive mode to blur/pause images/videos on-device
  • Visual detection: image heuristics sample pixels to escalate or block graphic imagery even without text
  • Domain blocklist: packaged defaults + user-importable list; allowlist overrides
  • Sensitivity profiles: Kids (7-12), Teens (13-16), College, and Work presets tuned for safeguarding and productivity goals
  • Explain why this was blocked: interstitial gives kid-friendly reasoning, safe suggestions, and rotating AI literacy micro-lessons
  • Family setup wizard: 30-second onboarding for age presets, PIN, and Focus defaults
  • Conversation starters: parent card with topic-only scripts when content is blocked (no URLs stored)
  • Kid reports: “Report unsafe page” button (host + optional note, stored locally, PIN-gated view)
  • Healthy nudges: gentle break reminders and wellbeing prompts, all on-device
  • Weekly tips: local digital-safety tips delivered once per week
  • Focus Mode: homework/study timer that blocks social/gaming/streaming and allows edu sites
  • Classroom Mode: teacher lockdown (social/gaming blocked, YouTube playlists only, overrides locked)
  • SafeSearch enforcement: redirects Google/Bing to strict modes (DNR)
  • Control centre: refreshed popup with live status badge, quick toggles, and policy management in one place
  • First-run tour: onboarding highlights key controls and policy workflows for new admins
  • Static ad rules: common ad/marketing domains blocked via DNR
  • PIN protection: require a PIN before overrides or allowlist edits, capturing on-device reason & approver logs
  • Secure alerts: HTTPS-only override/tamper webhooks (no localhost/LAN/creds) with PIN-locked setup
  • Safeguarding digest: export a weekly CSV summary of settings and override activity for DSL reviews
  • Override alerts: optional PIN-protected webhooks (Slack/Teams/email) with approver names for instant oversight
  • Encrypted override log: AES-GCM at rest; stores timestamp, host, reason, and approver only (no full URLs)
  • Interstitial: blocked page with timed “Show anyway” override (per tab/session)

Business-ready capabilities

  • Privacy by design: all analysis and decisioning stays on-device; no browsing data is transmitted.
  • Policy controls: organisation-wide allowlists & custom blocklists with import/export workflows.
  • Deployment friendly: minimal permissions (storage, declarativeNetRequest) and no background polling.
  • Support collateral: ready-made privacy policy, security briefing (SECURITY.md), support workflows (SUPPORT.md), UK safeguarding packs (docs/KCSIE_COMPLIANCE_MATRIX.md, docs/PREVENT_DUTY_BRIEFING.md, docs/DPIA_TEMPLATE_UK.md), and age-based profile presets.
  • Managed Chrome guidance: see docs/WEBSTORE.md for publishing, docs/DEPLOYMENT.md for rollout playbooks, and SUPPORT.md for help desk scripts.

Hosted resources

  • Bundled static pages (packaged inside the extension): site/index.html, site/privacy.html, site/support.html
  • Optional public hosting: host site/ on cyberheroez.co.uk (or enable GitHub Pages) and point the Chrome Web Store listing + homepage to those URLs.

Browser support

  • Chromium browsers (Chrome/Edge/Brave/Vivaldi/Opera): load the repo folder directly (contains manifest.json).
  • Firefox: build and load dist/firefox/manifest.json (see docs/BROWSER_SUPPORT.md).
  • Safari: convert via Apple’s Safari Web Extension tooling (see docs/BROWSER_SUPPORT.md).

Dev Setup

  1. Chrome → chrome://extensions → enable Developer mode
  2. Load unpacked → select this folder
  3. Open the popup → toggle Enable protection (badge shows Active)
  4. Optional: toggle Aggressive mode and adjust Sensitivity
  5. Optional: paste domains (one per line) into Blocklist → Import/Replace
    • or edit data/blocklist.json and reload the extension
  6. For private windows: open extension details → enable Allow in Incognito

Quick setup (parents)

  1. Enable protection in the popup.
  2. Run the Family Setup Wizard → pick age profile → set PIN (for overrides) → set Focus default.
  3. Turn on Conversation starters and Weekly tips (optional).
  4. Show your child the “Report unsafe page” button; review reports in Parent mode.

Quick setup (teachers)

  1. Enable protection; apply Classroom Mode when teaching.
  2. Add approved YouTube playlists/videos if needed; overrides stay locked.
  3. Use Focus Mode presets for study blocks; allow comms tools only if required.
  4. Review Child reports/Overrides in Parent mode (PIN-gated).

Privacy/Security at a glance

  • All analysis runs locally; no browsing history or page content is sent anywhere.
  • Kid reports store only timestamp + host + optional note; conversation starters store topic only.
  • Override logs are encrypted locally; webhooks require HTTPS and no LAN/localhost.
  • Web-accessible resources are limited; SafeSearch and DNR rules enforced; PIN hashes are salted/iterated.

Notes:

  • Content script is src/content.js (manifest aligned). The legacy content.js remains in repo but is not loaded.
  • Permissions: storage, declarativeNetRequest, tabs; scripts run on http/https pages only (tabs permission is used to show the active site toggle).
  • Web-accessible resources limited to https://*/* (no localhost/LAN) to reduce fingerprinting.
  • DNR rules are rebuilt on install/startup and when allowlist/blocklist change.
  • Interstitial uses safe DOM APIs; “Show anyway” temporarily allows the current host for this tab/session.

Roadmap

  • On-device visual model (optional) for stronger image/video detection
  • Options page polish + export/import lists (popup import exists)
  • Scheduled safeguarding digests and trust-level preset sharing
  • Chrome Web Store listing (screenshots, description, privacy link)

MIT License

Quick start

  1. Load unpacked (Developer mode)
  2. Toggle Enable protection in the popup (status badge turns green)
  3. Optional: toggle Aggressive mode + set sensitivity
  4. Blocklist: paste domains → Import/Replace (one per line)
  5. Visit sites to verify interstitial (strong signals) or blurring (contextual)

Phase 1 additions

  • Static DNR rules for common ad domains and SafeSearch (Google/Bing)
  • Dynamic DNR rules compiled from packaged + user-imported blocklist with allowlist overrides
  • Focus Mode timer with edu allowlist + social/gaming/streaming blocks
  • Classroom Mode lockdown for teachers (overrides disabled; YouTube playlists only)
  • Conversation starters, weekly tips, healthy nudges, and kid reports (host-only, optional note)

Limitations

  • Chrome’s dynamic DNR rules have capacity limits (~30k). Very large custom imports are truncated.
  • Visual detection is heuristic-based; cross-origin videos may block pixel reads (skipped).

Community

  • Code of Conduct: see CODE_OF_CONDUCT.md
  • Contributing guide: see CONTRIBUTING.md
  • Security policy: see SECURITY.md (report via GitHub advisories)
  • Support: see SUPPORT.md
  • Publisher: CyberHeroez CIC — https://cyberheroez.co.uk/
  • Maintainer: dipesthapa (dipesh@cyberheroez.co.uk)

Chrome Web Store

  • Publishing workflow: see .github/workflows/publish-webstore.yml
  • Setup + credentials + manual upload steps: docs/WEBSTORE.md
  • Listing content template: docs/STORE_LISTING.md
  • Build zip for upload: npm run zip:webstore (outputs dist/extension.zip; ensures only required files are packaged)

About

Safeguard (SafeBrowse AI) — privacy-first browser extension that detects phishing and unsafe sites in real-time.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors