Skip to content

About

Lightweight, zero-latency prompt injection firewall and AI data loss prevention (DLP) gateway for LLM applications and chatbots.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

0 stars

Watchers

0 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

🛡️ PromptShield

Enterprise In-Browser AI Data Loss Prevention & Prompt Firewall

GitHub Release Chrome Web Store Python SDK NPM Package License Zero VPS Cost

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


⚡ The Problem: The AI Secret Leak Crisis

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 $< 4\text{ ms}$ with zero cloud compute overhead ($0 VPS, $0 cloud bills).


🏛️ Architecture

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
Loading

🎯 Target Platforms Supported

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

🚀 Quickstart

1. Chrome / Brave / Edge Extension

  1. Download promptshield-v0.1.0.zip from Latest Releases.
  2. Unzip into a local directory.
  3. Open chrome://extensions/ (or edge://extensions/), enable Developer mode.
  4. Click Load unpacked and select the folder. PromptShield will automatically protect your AI sessions.

2. Python SDK (pip install promptshield)

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
    pass

3. Node.js / TypeScript SDK

npm install @ritualdev-lab/promptshield
import { 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);
}

🏢 Enterprise Fleet Features ($50K–$250K ACV Capabilities)

  • 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 ExtensionInstallForcelist policies and Windows Registry .admx templates.

📊 Performance Benchmarks

  • Inspection Latency: $&lt; 4.0\text{ ms}$ on 5,000+ character code snippets.
  • Memory Footprint: $&lt; 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+.


🏢 Enterprise Commercial Edition & PromptShield-Core

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

⚡ 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.


💖 Community Support & Alternative Sponsorship

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 Portal GitHub Sponsors


🎁 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).

🤝 Community & Support

  • Feature Requests & Bug Reports: Open an issue in our Public Issue Tracker.
  • Enterprise Licensing: Contact enterprise@ritualdev.in for multi-seat volume licensing, SSO, and dedicated SIEM integrations.
  • Core Development: Developed and maintained by RitualDev Studio.

Copyright © 2026 RitualDev Studio. Proprietary Commercial Software. All Rights Reserved.

🛡️ Community & Governance

About

Lightweight, zero-latency prompt injection firewall and AI data loss prevention (DLP) gateway for LLM applications and chatbots.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages