💡 Inspiration
We are living in the "Golden Age of AI." Every employee wants to use tools like ChatGPT and Google Gemini to work faster. But this speed comes with a massive, silent risk: Shadow AI.
We noticed that developers were accidentally pasting API keys into public chats, and managers were pasting confidential strategy documents to generate summaries. Traditional Data Loss Prevention (DLP) tools are too slow, too heavy, and they break the user experience—blocking everything or nothing.
We wanted to build a "Smart Firewall" for the GenAI era—one that doesn't just say "NO," but actually helps users be safe and productive.
💻 What it does
Blip is a browser-based security shield that intercepts sensitive data leaks before they leave the user's device. It operates in two intelligent modes:
- Standard Mode (Privacy-First): Runs entirely locally within the browser using high-performance Regex. It instantly blocks high-entropy secrets like API Keys (AWS, Stripe, Google) and PII.
- Enterprise Mode (Context-Aware): Connects to a secure backend powered by Google Gemini. It uses a RAG (Retrieval-Augmented Generation) engine to check text against specific company policies (e.g., "Do not share 'Project Olympus' details").
If a violation is detected, Blip blocks the paste and offers a unique "Sanitize & Retry" feature. With one click, it uses AI to redact only the sensitive information while keeping the rest of the prompt intact.
⚙️ How we built it
We utilized a Hybrid "Shift-Left" Architecture to balance security and speed:
- Frontend: Built a Chrome Extension (Manifest V3) that injects a listener into the DOM to intercept
pasteevents. We used Shadow DOM to render our UI without conflicting with the host website's styles. - Backend: A Python FastAPI server acts as the central reasoning brain.
- AI Engine: We integrated the Google Gemini API (
google-generativeai) to perform contextual classification and intelligent text sanitization. - Logic: We implemented a "Dual-Engine" approach—prioritizing local processing for speed ($<5ms$), and only offloading complex context checks to the cloud.
🚧 Challenges we ran into
Building a security tool that sits inside another web app (like Google Gemini) was incredibly difficult:
- The "Focus Lost" Bug: The hardest technical challenge was the "Sanitize" button. When a user clicked our popup, the browser focus shifted away from the chat box, causing the paste command to fail. We solved this by programmatically capturing the
originalTargetelement during the paste event and forcing focus back to it before triggering the insert. - The Z-Index War: Complex Single Page Applications (SPAs) like Gemini and ChatGPT have aggressive CSS layering. Our popup kept getting hidden behind the chat interface. We implemented a "Nuclear CSS" strategy, forcing our overlay to the maximum integer Z-Index (
2147483647) to ensure visibility.
🏆 Accomplishments that we're proud of
- Zero-Trust Success: Successfully intercepting paste events in real-time without breaking the browser's functionality.
- The "Sanitize" Feature: Moving beyond just "blocking" users to actually helping them fix their mistake in one click.
- Dual-Mode Architecture: Creating a system that works for individual students (Local Mode) just as effectively as it works for large corporations (Enterprise Mode).
🧠 What we learned
- Prompt Engineering for Security: We learned that simply asking an AI "Is this safe?" isn't enough. We had to write strict "System Instructions" to prevent the AI from hallucinating safety.
- Chrome Sandbox Limits: We mastered the intricacies of passing messages between
content.js(DOM access) andbackground.js(Service Workers). - User Psychology: Security tools are usually annoying. Adding the "Sanitize & Retry" button taught us that users are happy to comply with security policies if you make it effortless for them.
🚀 What's next for Blip
- Admin Dashboard: Building a full React dashboard for CISOs to view live threat logs and customize policies.
- Image Analysis: Using Gemini Pro Vision to detect sensitive data in screenshots pasted into AI models.
- Enterprise SSO: Integrating with Okta/Microsoft Entra ID for seamless corporate login.
Built With
- agentic
- ai
- css3
- firebase
- googlegemini
- html5
- javascript
- python
- rag
- regex
Log in or sign up for Devpost to join the conversation.