Production-grade LLM prompt injection defense middleware.
PromptShield sits between your users and your AI model, detecting and blocking adversarial attacks before they cause damage.
PromptShield runs every user input through 4 layers of defense:
| Layer | Name | What It Does |
|---|---|---|
| 1 | Input Classifier | Detects malicious prompt patterns |
| 2 | Context Sanitizer | Strips injected instructions from user input |
| 3 | Prompt Integrity Checker | Validates prompt structure hasn't been tampered with |
| 4 | Output Monitor | Scans AI responses for signs of successful injection |
- β 100% attack detection, zero false positives (benchmark tested)
- βοΈ Tunable aggression dial β
permissive
βbalanced
βstrict
βparanoid
- π API key authentication + rate limiting
- π Audit logging and dashboard UI
- π Python SDK for easy integration
- π³ Docker support
git clone https://github.com/JustiNoel/LLM-Prompt-Injection.git
cd LLM-Prompt-Injection
docker-compose up
Python Β· FastAPI Β· Google Gemini Β· Docker
Built by Justin Noel