SanitizeAI for VS Code / Cursor
Privacy-first GenAI Data Loss Prevention for VS Code and Cursor IDE.
Overview
SanitizeAI protects your sensitive data when using AI assistants in VS Code and Cursor. It automatically detects and masks sensitive information in your clipboard before you paste it into AI chat, preventing accidental exposure of credentials, API keys, and personal information.
Features
- 299+ Detection Patterns: Detects API keys, passwords, credit cards, SSNs, private keys, database credentials, and much more
- Automatic Clipboard Masking: Sensitive data is automatically masked when you copy text
- Interactive Masking: Click-to-reveal masking in editor with hover tooltips and Code Lens actions
- Individual Detection Control: Choose to mask or keep each sensitive item individually when multiple are detected
- Clipboard Restore: Original content is restored after a configurable delay (default: 5 seconds)
- Real-time Document Protection: Automatically masks sensitive data as you type in editor
- Real-time Protection: Works seamlessly in the background
- Privacy-First: All detection happens locally - your data never leaves your device
- Status Bar Integration: See your protection status at a glance
Installation
VS Code Marketplace
Install from VS Code Marketplace
Cursor IDE
Search for "SanitizeAI" in Cursor's Extensions marketplace or install from VS Code Marketplace.
How It Works
Clipboard Protection
- Copy sensitive text to your clipboard (from terminal, browser, etc.)
- SanitizeAI detects sensitive patterns automatically
- Choose your action: Mask all, keep all, or choose individually for each detection
- Clipboard is masked with safe placeholders (e.g.,
t***@gmail.com)
- Paste safely into Cursor/VS Code AI chat
- Original restored after delay (configurable)
Editor Protection
- Type sensitive data in any editor file
- SanitizeAI detects and masks automatically in real-time
- Hover over masked text to see original value
- Use Code Lens actions to restore or keep masked
- Your choices are remembered - restored text won't be re-masked
Commands
SanitizeAI: Check Chat Input - Manually check clipboard for sensitive data
SanitizeAI: Open Settings - Open extension settings panel
SanitizeAI: Show Status - Show current status and detection count
SanitizeAI: Sign In / Create Account - Authenticate with SanitizeAI
SanitizeAI: Logout - Sign out of your account
SanitizeAI: Restore Original - Restore original text for a masked segment (via Code Lens)
SanitizeAI: Keep Masked - Keep text masked permanently (via Code Lens)
SanitizeAI: Restore Original Clipboard - Manually restore original clipboard content
Configuration
Open VS Code Settings (Ctrl+,) and search for "SanitizeAI":
| Setting |
Default |
Description |
sanitizeai.enabled |
true |
Enable/disable protection |
sanitizeai.restoreDelay |
5 |
Seconds before restoring original clipboard (1-60) |
Detection Categories
| Category |
Examples |
| Cloud Credentials |
AWS, GCP, Azure, DigitalOcean, Heroku, Vercel, Railway |
| AI Service Keys |
OpenAI, Anthropic, HuggingFace, Cohere, Replicate |
| Payment Credentials |
Stripe, PayPal, Square, Razorpay |
| Database Secrets |
MongoDB, PostgreSQL, Redis, Supabase, PlanetScale |
| Communication |
Slack, Discord, Telegram, Twilio, SendGrid |
| Personal Info |
SSN, Credit Cards, Phone Numbers, Email |
| Crypto |
Private Keys, Seed Phrases, Exchange API Keys |
| Generic Secrets |
Passwords, API Keys, Tokens, Private Keys |
Privacy
- All sensitive data detection happens locally on your machine
- We never read, store, or transmit your actual sensitive data
- Only anonymized usage statistics are sent (e.g., "1 API key detected" - not the actual key)
- See our full Privacy Policy
Pricing
- Free: 100 masks/month
- Pro: Unlimited masks ($4.99/month or $49.99/year)
- Enterprise: Custom pricing for teams
Requirements
- VS Code 1.74.0 or higher
- Cursor IDE (any version)
Support
License
Proprietary - All rights reserved © 2024 SanitizeAI
| |