How kartikbhosle/trustguard works
TrustGuard is a Chrome extension that watches password fields, waits for typing to pause, checks passwords against HIBP using a locally computed SHA-1 prefix/suffix query, then displays a safe or breached status. The graph separates page-field discovery, privacy-preserving lookup, and user feedback. The README documents manifest and styling capabilities; source excerpts show the central runtime behavior, but not every implementation detail.
Main entry points: content.js Input Debounce · manifest.json Extension Config · style.css Tooltip Styling
Components 12
Field Discovery
- Password Fields
- Extension Config
manifest.json - Field Monitor
content.js - Input Debounce
content.js
Privacy Check
- Secure Context Guard
content.js - Local SHA-1
content.js - Range Lookup
content.js - Suffix Matching
content.js
User Feedback
- Status Tooltip
content.js - Tooltip Styling
style.css
Other components
- Website User
- HIBP API
Connections 11
- Website User → Password Fields: enters password
README.md - Extension Config → Field Monitor: configures script
README.md - Field Monitor → Password Fields: scans and observes
content.js - Field Monitor → Input Debounce: binds input handler
content.js - Input Debounce → Secure Context Guard: checks context
content.js - Input Debounce → Local SHA-1: checks password
content.js - Local SHA-1 → Range Lookup: provides hash
content.js - Range Lookup → HIBP API: requests prefix range
content.js - Range Lookup → Suffix Matching: matches response
content.js - Input Debounce → Status Tooltip: shows breach count
content.js - Status Tooltip → Tooltip Styling: uses overlay styles
README.md