Inspiration
People often share documents and snippets with AI without realizing they contain personal information. I wanted to add a clear privacy check at the moment of sharing, while keeping the scan on the user’s device.
What it does
LocalGuard is a Chrome extension prototype for ChatGPT and Claude. It scans selected TXT, CSV, JSON, Markdown, and searchable PDF files, plus text pasted into supported fields. It blocks detected sensitive patterns by default and lets the user keep the content blocked or allow it once. Its warning shows the finding category without revealing the matched value.
How we built it
I built LocalGuard as a Chrome Manifest V3 extension using JavaScript. A browser content script checks file selections and user-initiated paste events. PDF.js is bundled locally to extract text from searchable PDFs. LocalGuard has no server for receiving file or clipboard content.
Challenges we ran into
The extension had to intercept uploads and pastes before a supported site processed them, while still letting clean content continue normally. PDF scanning also required bundling the PDF library and worker with the extension. Detection is pattern-based, so I had to consider both missed matches and false alarms, especially for unseparated nine-digit numbers.
Accomplishments we’re proud of
LocalGuard can block sensitive sample files and pasted text on ChatGPT and Claude, while allowing a user to make a one-time choice. I’m proud that the warning identifies the risk without displaying the matched data.
What we learned
I learned how browser extensions interact with file-picker and paste events, how to extract text from PDFs locally, and why privacy tools need to explain what they check—and where their limits are.
What’s next for LocalGuard
I’d like to improve detection accuracy, support more AI sites, and explore OCR for images and scanned PDFs. I’d also like to investigate typed text and drag-and-drop protection.
Built With
- chrome
- css
- html
- javascript
- manifest-v3
- pdf.js
Log in or sign up for Devpost to join the conversation.