PromptShield is an enterprise-grade, in-browser Data Loss Prevention (DLP) and Prompt Firewall extension (Manifest V3) that stops source code secrets, customer PII, project codenames, and API credentials from leaking into AI tools (ChatGPT, Claude, Gemini, DeepSeek, Copilot, Perplexity, HuggingFace Chat, and Le Chat).
Get Extension • Python SDK • Architecture • Enterprise Fleet • Documentation
Every day, engineers, analysts, and knowledge workers paste confidential company data into AI chatbots:
- Over 42% of knowledge workers paste corporate data into ChatGPT without authorization.
- API Keys & Cloud Secrets: Leaked AWS, OpenAI, GitHub, Stripe, and Database URIs expose production systems.
- Uncapped Cloud Liabilities: Once a secret is regurgitated into a public LLM context, it cannot be deleted.
PromptShield inspects and sanitizes every prompt locally on the workstation CPU in
PromptShield operates on an air-gapped, zero-knowledge local architecture. Plaintext prompts never leave your browser.
flowchart TD
subgraph BrowserWorkstation["Client Browser (Chrome / Edge / Brave / Arc)"]
UI["AI Prompt Box (ChatGPT / Claude / Gemini / DeepSeek)"]
subgraph ContentRuntime["Local In-Browser DLP Engine (< 4ms)"]
DOMHook["Universal DOM Hook & Enter Interceptor"]
RegexEngine["60+ Credential Signatures Engine"]
EntropyEngine["Fast Shannon Entropy Calculator (H > 4.5)"]
PIIEngine["Luhn / Verhoeff Algorithmic Validator"]
SurrogateEngine["In-Flight Deterministic Surrogate Redactor"]
OverlayBadge["Floating Shield Indicator & Inspection Flyout"]
end
subgraph BackgroundVault["Secure Service Worker"]
LocalVault["WebCrypto AES-256-GCM Encrypted Incident Ledger"]
PolicySync["HMAC-SHA256 Fleet Policy Sync Engine"]
end
UI -->|Keystrokes / Paste / Submit| DOMHook
DOMHook --> RegexEngine & EntropyEngine & PIIEngine
RegexEngine & EntropyEngine & PIIEngine --> OverlayBadge
OverlayBadge -->|1-Click Redact & Send| SurrogateEngine
SurrogateEngine -->|Sanitized Prompt| UI
DOMHook -.->|Zero-Plaintext Metadata Only| BackgroundVault
end
subgraph ZeroCostEdge["Serverless Edge (api.promptshield.io)"]
CFWorkers["Cloudflare Workers (100k free req/day)"]
SIEM["Enterprise SIEM (Splunk / Datadog / Sentinel CEF)"]
end
PolicySync -.->|Sync Rules & Canary Tokens| CFWorkers
BackgroundVault -.->|Metadata Telemetry Only| CFWorkers
CFWorkers -.-> SIEM
| AI Platform | Supported Domains | Interception Mechanism |
|---|---|---|
| OpenAI ChatGPT | chatgpt.com, chat.openai.com |
#prompt-textarea, div[contenteditable="true"], submit lock |
| Anthropic Claude | claude.ai |
div.ProseMirror, ProseMirror transaction hooks |
| Google Gemini | gemini.google.com |
rich-textarea, dynamic Shadow DOM observer |
| DeepSeek | chat.deepseek.com |
textarea, dynamic React state binding |
| Microsoft Copilot | copilot.microsoft.com |
#searchbox, iframe isolation hooks |
| Perplexity AI | perplexity.ai |
textarea[placeholder*="Ask"] |
| HuggingChat / Le Chat | huggingface.co/chat, chat.mistral.ai |
Fallback universal textarea observer |
- Download
promptshield-v0.1.0.zipfrom Latest Releases. - Unzip into a local directory.
- Open
chrome://extensions/(oredge://extensions/), enable Developer mode. - Click Load unpacked and select the folder. PromptShield will automatically protect your AI sessions.
Used by backend engineering teams to protect LangChain, LlamaIndex, and FastAPI LLM endpoints:
from promptshield import PromptFirewall
# Initialize in-memory zero-dependency firewall
firewall = PromptFirewall(mode="BLOCK")
user_input = "Here is our database connection: postgresql://admin:secretPass123@prod.db:5432/main"
result = firewall.inspect(user_input)
if not result["allowed"]:
print(f"🛑 Blocked! Detected: {result['violations'][0]['rule_name']}")
print(f"Severity: {result['violations'][0]['severity']}")
else:
# Safe to pass to OpenAI / Claude API
passnpm install @ritualdev-lab/promptshieldimport { InBrowserDlpEngine, SurrogateMaskingEngine } from '@ritualdev-lab/promptshield';
const engine = new InBrowserDlpEngine();
const result = engine.scan("My AWS key is AKIAIOSFODNN7EXAMPLE");
if (result.hasViolations) {
const masked = SurrogateMaskingEngine.mask(userPrompt, result.violations);
console.log("Safe Prompt:", masked.redactedPrompt);
}- Central Fleet Policy Sync (
api.promptshield.io): Push corporate DLP policies, project codenames, and custom regex rules across 10,000+ managed laptops with cryptographic HMAC-SHA256 signature verification. - Real-Time SIEM & SOC Streaming: Turnkey streaming adapters for Splunk HEC, Datadog Logs JSON, and ArcSight / Microsoft Sentinel Common Event Format (CEF).
- Synthetic Canary Honeypots: Injects decoy API tokens into sessions to mathematically verify whether LLMs retain private customer tokens.
- Enterprise Windows GPO & Jamf Deployments: Pre-configured Chrome Enterprise
ExtensionInstallForcelistpolicies and Windows Registry.admxtemplates.
-
Inspection Latency:
$< 4.0\text{ ms}$ on 5,000+ character code snippets. -
Memory Footprint:
$< 18\text{ MB}$ resident memory. - Infrastructure Cost: $0.00 / month ($0 VPS, $0 cloud compute overhead).
- Test Verification: 77 / 77 passing tests across Node 20, 22, 24 and Python 3.8+.
| Feature | Community Extension ($0 Free) | PromptShield-Core Fleet ($49/mo) |
|---|---|---|
| Client-Side Secret Masking | ✅ Basic Rules (<4ms) | ✅ Advanced Shannon Entropy + 120+ Redaction Signatures |
| Supported LLMs | ChatGPT, Claude, Gemini | Full Fleet (ChatGPT, Claude, Gemini, DeepSeek, Copilot, Perplexity, Custom APIs) |
| Private Core Engine | ❌ Pre-packaged | ✅ Direct Git Access to PromptShield-Core (Custom builds, ADMX, GPO) |
| Enterprise SIEM Integration | ❌ Local Only | ✅ Live Forwarding to Datadog, Splunk, Graylog, AWS CloudWatch |
| Central Admin Fleet Management | ❌ Local Storage | ✅ Organization Policy Push & Central Webhook Relay |
| Automated Compliance Exports | ❌ None | ✅ SOC2 Type II, HIPAA, PCI-DSS, ISO 27001 Audit Ready Reports |
| Collaborator Git Access | ❌ Public Repo | ✅ Instant GitHub Invite to RitualDev-Lab/PromptShield-Core
|
⚡ Subscribe to PromptShield-Core ($49/mo) & Unlock Private Repo Access Instantly
🔒 Automated GitHub Fulfillment: Enter your GitHub username during checkout. Our webhook immediately dispatches a collaborator invite to PromptShield-Core.
PromptShield is engineered by RitualDev Lab. Your sponsorship funds our client-side regex security rules, Shannon entropy detection models, and multi-browser enterprise extension releases (Chrome, Edge, Firefox).
🎁 Interactive Donation Form (USD & INR UPI) • ❤️ GitHub Sponsors
🔒 Powered by Dodo Payments (Merchant of Record) with instant tax invoice and global payment methods (Cards, UPI, Apple Pay).
- Feature Requests & Bug Reports: Open an issue in our Public Issue Tracker.
- Enterprise Licensing: Contact
enterprise@ritualdev.infor multi-seat volume licensing, SSO, and dedicated SIEM integrations. - Core Development: Developed and maintained by RitualDev Studio.