PromptShield

PromptShield

Open source LLM security platform. Scans every prompt for PII and secrets, enforces policy, and routes to any provider. Runs entirely on your infrastructure.

Point your SDK at the gateway and it scans every prompt, enforces policy, and routes to your provider. No code changes to your app.

PromptShield architecture

What it catches

  • Secrets: AWS keys, GitHub tokens, OpenAI keys, Anthropic keys, Stripe keys, Slack tokens, DB connection strings, private keys, JWTs
  • PII: email, phone, SSN, credit card, IBAN, passport, medical license (30+ types, 6 languages)
  • Responses: optionally scans LLM output before it reaches your app

Block or mask per entity type. Policy is a YAML file — check it into git, hot-reloads without restart.

Three components

Gateway only+ Engine+ Dashboard
Provider routing
Rate limiting
Token budgets
API key vault
Audit logs
Prometheus metrics
Secret detection (150+ rules)
PII detection
Prompt injection detection
Policy enforcement
Response scanning
Policy editor UI
Audit log UI
Key management UI

Only the gateway is required. Secret detection (Gitleaks, 150+ rules) is built in and runs without the engine. Add the engine for PII and injection detection, and the dashboard for a UI.

Policy actions

ActionBehavior
blockHTTP 403. LLM never called. Zero tokens consumed.
maskPII replaced with [ENTITY_TYPE]. Sanitized prompt forwarded.
allowPasses through unchanged.
warnLog and allow. Coming soon.

On this page