Inspiration
I counted the browser extensions I had installed and found 14. I couldn't say what half of them were allowed to do. Most people never check, and an extension with the right permissions can read every page you visit.
I wanted a tool that shows what an extension can access and also how sure it is about that. That led to TrustLens.
What it does
TrustLens is a browser-security workspace. Each tool explains its rating and says what it could not check.
| Tool | What it checks | What you get |
|---|---|---|
| Extensions | Permissions, code, store signals | A risk range with reasons |
| Websites | Address, server, threat databases, authenticity, content | Red flags and good signs per check |
| Sender, SPF/DKIM/DMARC, wording, links | A phishing indicator with findings | |
| Passwords & breaches | Strength, known breaches (several providers merged) | A clear result and advice |
| Lookalike domains | Fake versions of a real site | Matches and warnings |
| Compare | Two extensions side by side | Which one is lower risk, and why |
It also has a token-authenticated API and an admin area with audit logs.
TrustLens never says something is "safe". It says what was checked, what wasn't, and how confident the result is.
How I built it
- Backend: Python and Flask, with SQLite for storage
- Frontend: Jinja2 templates and Bootstrap, with a strict Content Security Policy (no inline scripts or styles)
- Security: hashed and revocable API tokens, CSRF protection, rate limiting
- Quality: more than 350 automated tests
The extension score has two parts:
- Access is what an extension can do, taken from its permissions.
- Risk is how likely it is to hurt you. It depends on whether that access fits the extension's purpose and on what the code and store evidence show.
Challenges
My first scoring was "more permissions = higher risk", and it failed on real extensions. A password manager, which genuinely needs broad access, came out as high risk. A small extension asking for little looked fine.
Fixes:
- [x] Score by purpose, not by permission count
- [x] Cap the rating at Medium when only the manifest was read
- [x] Show a range, not one exact number
I also redesigned the interface around an "inspection report" layout, because my first version looked like a pile of cards.
What I learned
- A security tool that sounds more certain than it should be can do more harm than no tool.
- Saying "I'm not sure, and here's why" was harder to build than giving answers.
- Writing tests for my own scoring rules caught logic mistakes I would never have spotted by hand.
What's next
- [ ] Test the scoring against a larger set of real, labelled extensions
- [ ] Add a peer baseline (how an extension compares with others of the same type)
- [ ] Host it publicly with a proper database
Built With
- bootstrap
- css3
- cybersecurity
- flask
- google-safe-browsing
- html5
- javascript
- jinja
- playwright
- pytest
- python
- reportlab
- rest-api
- sqlite
- virustotal