🛡️ PromptSecurityMind

AI-powered prompt injection detection and defense for your LLM applications

Test Prompt Scanner

🔍

Input Scanning

Detect prompt injection attempts in real-time with 9 threat categories including jailbreaks, role-playing attacks, and delimiter injection.

🛡️

Prompt Hardening

Wrap your prompts with OWASP-recommended defensive patterns to prevent instruction override and context manipulation.

Output Validation

Check LLM responses for leaked secrets, PII exposure, and system prompt leakage before returning to users.

🧠

Vector Threat Intel

Semantic similarity search against known threats. Continuously learns from new attack patterns.

Auto-Blocking

Automatically block users or IPs that exceed threat thresholds. Configurable windows and limits.

🔔

Admin Alerts

Email and webhook notifications for critical threats. Slack and Discord integration available.

API Reference

POST /api/scan

Scan input text for prompt injection threats

POST /api/scan-context

Scan RAG context for indirect injection

POST /api/harden

Wrap prompts with defensive patterns

POST /api/validate

Validate LLM output for leaks/PII

GET /api/rules

Get current detection rules

Threat Categories

Critical

Jailbreak

DAN mode, unrestricted AI, bypass filters

High

Instruction Override

Ignore previous, forget all, new mission

High

Role Playing

Pretend you are, act as if, roleplay as

High

Authority Impersonation

[SYSTEM], admin override, developer mode

High

Delimiter Injection

```system, </system>, [INST], <<SYS>>

High

Encoding Obfuscation

Base64, hex codes, character substitution

High

Context Manipulation

Previous context is wrong, new instructions

Medium

Prompt Extraction

Repeat your prompt, show instructions

Medium

Psychological

Emergency, academic purposes, grandmother

Integration

Internal Service Call (Python)

import httpx

async def scan_prompt(text: str) -> dict:
    async with httpx.AsyncClient() as client:
        response = await client.post(
            "http://localhost:8043/api/scan",
            json={"text": text},
            headers={"X-Internal-Service": "YOUR_SERVICE_KEY"}
        )
        return response.json()

result = await scan_prompt("ignore all previous instructions")
if not result["safe"]:
    raise SecurityException(result["threats"])

MCP Tool (Claude Desktop)

{
  "mcpServers": {
    "promptsecurity": {
      "command": "python",
      "args": ["/opt/mcpcio/promptsecuritymcp/src/mcp_server.py"]
    }
  }
}