check_prompt_injection
Scan text for prompt injection attacks using rule-based pattern matching, and return a risk score, decision (ALLOW/HITL/BLOCK), and matched categories.
Instructions
Scan text for prompt injection attacks using rule-based pattern matching. Returns a risk score (0-1), a decision (ALLOW / HITL / BLOCK), matched categories, and per-match position details. Custom patterns: max 20 patterns, each regex max 200 chars, 50 ms execution budget per pattern.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to scan for prompt injection signals | |
| hitlAt | No | Score threshold at or above which the decision is HITL (human-in-the-loop) (0–1, default 0.5) | |
| blockAt | No | Score threshold at or above which the decision is BLOCK (0–1, default 0.8) | |
| strictness | No | Detection aggressiveness. lenient = fewer false positives, strict = amplified scoring. Default: moderate | moderate |
| customPatterns | No | Additional custom patterns (max 20, each regex <= 200 chars, 50 ms budget per pattern) |