CleanMyPrompt — AI Firewall for Developers
Block secrets, PII, and API keys before they reach Copilot. 100% local. Zero network calls.
How it works — in Copilot Chat:
You: @cleanmyprompt fix the auth in this fetch call:
fetch(API_URL, { headers: { Authorization: "Bearer eyJhbGc...Xk9s" }})
🛡 Intercepted 1 item before sending to Copilot:
• [BEARER-TOKEN]: `eyJhbGc…Xk9s`
Copilot: Here's the fixed auth pattern — use environment variables instead of
hardcoded Bearer tokens...
In the editor — inline warning:
const apiKey = "sk-proj-T8kLmN..."
// ^^^^^^^^^^^^^^^^^^^ ⚠ CleanMyPrompt: OpenAI Project API key
// detected — redact before pasting to AI.
The problem
Every time you paste code into Copilot Chat, you risk sending:
- Hardcoded API keys and tokens
- Database connection strings with credentials
- Email addresses, phone numbers, or SSNs from test data
- JWT tokens, private keys, or Bearer tokens
CleanMyPrompt sits between you and the AI and intercepts all of it — silently, locally, before the data leaves your machine.
Features
@cleanmyprompt — Copilot Chat participant
Type @cleanmyprompt followed by your prompt. The extension:
- Scans your prompt for secrets and PII
- Shows you exactly what was redacted and why
- Forwards the clean version to Copilot
@cleanmyprompt explain this function [paste code with credentials]
Sub-commands:
@cleanmyprompt /scan — full risk report for the active file
@cleanmyprompt /squeeze [code] — token count before and after redaction
Inline diagnostics
Red and yellow squiggles appear directly on detected risks in any supported language. Hover for a description. No setup required.
Right-click → Redact Selection
Select any text, right-click, and choose CleanMyPrompt: Redact Selection. The selection is redacted in-place. Undo with Ctrl+Z.
Keyboard shortcut: Ctrl+Alt+R
Redact Entire File
Command palette: CleanMyPrompt: Redact Entire File
Shows a summary of what will be changed before applying. Fully undoable.
Status bar
🛡 Clean when the active file is clear. ⚠ N risks when high-risk items are detected.
What gets detected
| Category |
Examples |
| API Keys |
OpenAI sk-..., Stripe sk_live_..., AWS AKIA..., GitHub ghp_..., Google AIza... |
| Tokens |
JWT tokens, Bearer tokens, PEM private keys |
| Credentials |
Hardcoded passwords, connection strings with user:pass, env var assignments |
| PII |
Email, phone (international), SSN, credit card (Luhn-validated), IBAN |
| Network |
IPv4 addresses |
| Code patterns |
password = "secret", Authorization: 'Bearer ...', os.environ['KEY'] = '...' |
Supported languages: JavaScript, TypeScript, Python, Java, Go, Rust, C/C++, C#, Ruby, PHP, Swift, Kotlin, SQL, Shell, YAML, JSON, TOML, Markdown, HTML, and more.
Privacy
- Zero network calls. All scanning runs in the VS Code extension host process.
- Zero telemetry. No usage data is collected or transmitted.
- No login required. Works immediately after install.
- Open source redaction engine — inspect exactly what runs on your code.
Settings
| Setting |
Default |
Description |
cleanmyprompt.enableDiagnostics |
true |
Show inline squiggles for detected items |
cleanmyprompt.minimumSeverity |
warning |
Minimum severity to display (error / warning / information) |
cleanmyprompt.enableStatusBar |
true |
Show the risk indicator in the status bar |
cleanmyprompt.enableCodeRules |
true |
Enable code-specific rules (hardcoded passwords, Bearer tokens) |
Requirements
- VS Code 1.90 or later
- GitHub Copilot (for the
@cleanmyprompt Chat participant)
- Without Copilot, all other features (diagnostics, redact commands, status bar) still work fully
Enterprise
Need team-wide rule sets, audit logs, or custom redaction patterns for your organisation? Visit cleanmyprompt.io to discuss an enterprise plan.
Links