I almost leaked an API key into ChatGPT, so I built a Chrome extension
Source: Dev.to
Introduction
I use AI chat tools a lot when coding and analyzing logs. A few days ago I almost pasted a real API key into ChatGPT while sharing some logs, but I noticed it just before sending.
The Problem
It’s extremely easy to accidentally leak sensitive data when using AI chats.
The Solution: PasteSafe
I built a small Chrome extension called PasteSafe. When you paste text into AI chats, it scans the content and detects things like:
- API keys
- Emails
- Phone numbers
- IBANs
- UUIDs
- URLs
If something sensitive is detected, PasteSafe automatically masks the values before the message is sent.
Supported AI Chats
- ChatGPT
- Claude
- Gemini
How It Works
Everything runs locally in the browser:
- No servers
- No tracking
- No data collection
Try It
Source Code
Discussion
Have you ever accidentally pasted something sensitive into an AI chat?