Prompt Injection Heuristic Scanner
Prompt Injection Heuristic Scanner: Scans input against heuristic rules for system prompt override attempts, DAN jailbreaks, and delimiter escapes.
About this prompt injection heuristic scanner
Scans input against heuristic rules for system prompt override attempts, DAN jailbreaks, and delimiter escapes Validates and converts interface schemas client-side without transmitting private endpoint specifications.
API contract & interface schema logic
Calculates sub-word token counts across major AI tokenizer architectures (OpenAI Tiktoken cl100k_base / o200k_base for GPT-4o, Anthropic Claude byte-pair encodings, and SentencePiece tokenizers for Gemini and Llama). Validates Structured Outputs JSON Schemas and tool definitions for Function Calling APIs, enforcing strict schema constraints (e.g. additionalProperties: false, all properties in required array).
Worked schema conversion scenario
Scenario: Check one English instruction-override phrase against four fixed heuristic patterns.
Sample input:
Processing: Matches four fixed English regular expressions; one matching rule yields medium risk and score 35. This is not a comprehensive prompt-injection defense.
Illustrative output:
Schema version & syntax constraints
This is a regex heuristic, not a reliable detection or safety guarantee. Paraphrases and other languages may be missed.
API specifications and schema models in Prompt Injection Heuristic Scanner reflect OpenAPI and JSON Schema standards. Verify generated schemas against your runtime validator.
Client-side schema processing boundary
Schema analysis and protocol mapping in Prompt Injection Heuristic Scanner execute locally in the browser tab without uploading endpoint definitions.
OpenAPI Specification & JSON Schema standards
OpenAPI Specification standards and JSON Schema draft definitions:
- Implementation-specific browser utility or reference guide (no single governing external standard)
Prompt Injection Heuristic Scanner verification · Audit standards
How to use it
- Paste prompt or response text.
- Search for a small fixed set of English override, disclosure and jailbreak phrases.
- Read matched phrases, score and low/medium/high label.
Frequently asked questions
How does Prompt Injection Scanner assign risk?+
It tests submitted text against four case-insensitive patterns: ignore previous instructions, reveal system prompt, jailbreak or DAN, and developer message or bypass safety. Each hit adds 35 points and two or more hits are high risk.
Can you show an input and its result?+
Ignore all previous instructions together with Reveal the system prompt matched two rules and returned high risk, score 70, and two recorded matching strings.
What attacks can this scanner miss or overflag?+
It is a small pattern matcher, so paraphrases, multilingual attacks, encoded text, indirect injection, tool output attacks, benign quotations and contextual intent can be missed or incorrectly flagged.
Does a low score mean a prompt is safe?+
No. The result is a local heuristic only. It does not enforce system instructions, inspect model context, sanitize tools, stop data exfiltration or replace human and application security controls.
