
Prompt Injection Scanner
io.github.4hmetuyarPublished by GitHub account 4hmetuyarv0.2.2Updated Oct 24, 2026
Scans RAG content/scraped pages for indirect prompt injection
Overview
Local MCP server that scans RAG chunks, scraped pages and documents for indirect prompt injection before an assistant reads them.
- What you can do
- Scan a text snippet or document for injection payloads
- Scan a single file, or recursively scan a directory such as a RAG knowledge base
- List the supported detection patterns by category
- Report findings with severity, an explanation of the risk and a recommended fix
- Produce SARIF output and a CLI scan mode for CI/CD pipelines
- When to use it
- Use it when an assistant ingests untrusted content — retrieved RAG chunks, scraped web pages, third-party documents — and you want a check for embedded instructions, hidden text or exfiltration attempts before that content enters the context.
- Requirements
- Runs locally over stdio via npx from the npm package; Node.js required. No accounts, API keys or environment variables are needed for the default scan. The optional LLM judge needs a model endpoint configured through GUARDBEE_JUDGE_URL and GUARDBEE_JUDGE_MODEL.
Installation
In SourceWeft
- Open Prompt Injection Scanner in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@guardbee/mcp-prompt-injection-scanner
🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch
[npm version] [npm downloads] [License: MIT]
An MCP (Model Context Protocol) server that scans content — a RAG chunk, a scraped web page, a document — for indirect prompt injection payloads.
ai-code-scanner and mcp-server-auditor scan code; this package scans data. In classic prompt injection, the attacker writes a malicious prompt themselves; in indirect prompt injection, the attacker never talks to the model at all — instead they embed instructions in a document, web page, or tool result the model will later read. The moment the model pulls this content into its context via a RAG retrieval or a web fetch, the embedded instruction appears to carry the same authority as the user's own instructions.
Telemetry is off by default. With
GUARDBEE_TELEMETRY=1it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields likecontent,tokenorpasswordare replaced with a placeholder. See@guardbee/mcp-telemetry.
Features
- 17 patterns, 5 categories — instruction-override, role-spoofing, hidden-text, direct-address, exfiltration. English and Turkish phrasing
- The rules live in
@guardbee/guard-core, shared with@guardbee/mcp-security-proxy, so a phrase this scanner reports is the same phrase the proxy blocks at runtime - Every finding includes why it's risky and what to do about it (
recommendation) — not just "found it" - SARIF 2.1.0 output — CI/CD integration (e.g. auto-scanning a knowledge-base repo on every PR)
- Config file support via
guardbee.yml - 45 unit tests — a positive and a negative (false-positive) scenario for every pattern; known false-positive sources like emoji ZWJ sequences and ordinary
display:nonemodals are specifically tested
Quick Start
Claude Desktop / MCP Client
CLI (CI/CD — e.g. scan a RAG knowledge-base repo on every PR)
MCP Tools
Detected Patterns
These are heuristic findings — a static text-pattern scan, not a semantic/intent analysis. Designed for a low false-positive rate (e.g. emoji ZWJ sequences and ordinary display:none modals are specifically excluded), but every finding should still be reviewed manually.
LLM judge (optional)
The patterns know attack phrases; a paraphrased, indirect or translated instruction slips past them. --judge also has a model read each file, in chunks, and reports instructions aimed at an agent as judge_semantic_injection (high). The finding carries judge: { model, version, confidence }, also in SARIF properties. The judge only adds findings.
It is off unless configured. Since the content goes to the endpoint, a non-local one needs --judge-allow-remote and https. On GuardBee's judge benchmark (50 English and Turkish samples), the patterns catch 16% of the attacks and qwen2.5:7b all of them, with no false positives.
Configuration (guardbee.yml)
Development
License
MIT — GuardBee
Feedback
Questions, ideas, or a false positive? Start a thread in GitHub Discussions or open an issue. If GuardBee is useful to you, a ⭐ on the repository helps others find it.
Source: packages/prompt-injection-scanner/README.md at commit 952a0bf
Tools
0Version history
3- v0.2.2LatestOct 2, 2026
- v0.2.1Sep 30, 2026
- v0.1.4Sep 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
