SecretShield is an essential real-time security auditor for Visual Studio Code. It detects leaked API keys, authorization tokens, private keys, and database passwords directly in your code as you type — before you ever commit or push to GitHub.
⚡ What Secrets Does SecretShield Detect?
Provider / Secret Type
Pattern Caught
Severity
Google & Gemini API Keys
AIzaSy... (39 chars)
🔴 High
OpenAI Secret Keys
sk-... / sk-proj-...
🔴 High
GitHub Tokens
ghp_..., gho_..., github_pat_...
🔴 High
AWS Access Keys
AKIA..., ASIA... (20 chars)
🔴 High
Stripe Secret Keys
sk_live_..., sk_test_...
🔴 High
Slack Bot & User Tokens
xoxb-..., xoxp-...
🔴 High
Cryptographic Private Keys
-----BEGIN RSA/EC PRIVATE KEY-----
🔴 Critical
Database URIs with Passwords
postgres://user:pass@..., mongodb://...
🔴 High
Generic Secret Assignments
api_key = "...", password = "..."
🟡 Warning
🚀 Key Features
Real-Time As-You-Type Scanning: Immediate red squiggly underlines on any leaked secret.
💡 One-Click Quick Fix (Lightbulb): Hover over any exposed key to instantly redact it or replace it with process.env.SECRET_KEY.
🛡️ One-Click "Mask All Secrets": Automatically scrubs all detected secrets in the current file with a single command.
📊 Status Bar Sentinel: Shows $(shield) SecretShield: Clean when safe, and flashes $(alert) SecretShield: X Exposed! when credentials are detected.
🔒 100% Offline & Private: Zero external network calls. All regex matching runs entirely on your local machine.
⌨️ Commands
SecretShield: Scan Current File for Secrets & API Keys
SecretShield: Redact / Mask All Detected Secrets in File
📦 Installation
In VS Code, press Ctrl+Shift+X.
Click ... at the top right of the Extensions panel.
Select Install from VSIX... and pick secret-shield-sentinel-1.0.0.vsix.