
Prompt Injection Scanner
io.github.4hmetuyar由 GitHub 帳號 4hmetuyar 發布v0.2.2更新於 Oct 24, 2026
Scans RAG content/scraped pages for indirect prompt injection
概覽
本機 MCP 伺服器,在助理讀取之前掃描 RAG 片段、擷取網頁與文件中的間接提示注入。
- 可以做什麼
- 掃描文字片段或文件中的注入內容
- 掃描單一檔案,或遞迴掃描 RAG 知識庫等目錄
- 依類別列出支援的偵測規則
- 回報發現項目,包含嚴重程度、風險說明與處理建議
- 輸出 SARIF 結果,並提供供 CI/CD 使用的命令列掃描模式
- 適用情境
- 當助理要讀取不受信任的內容(檢索到的 RAG 片段、擷取的網頁、第三方文件),並希望在內容進入上下文前檢查是否夾帶指令、隱藏文字或外洩企圖時使用。
- 執行需求
- 透過 npx 從 npm 套件以 stdio 方式在本機執行,需要 Node.js。預設掃描不需帳號、API 金鑰或環境變數。選用的 LLM 判定功能需以 GUARDBEE_JUDGE_URL 與 GUARDBEE_JUDGE_MODEL 設定模型端點。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Prompt Injection Scanner,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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.
來源:packages/prompt-injection-scanner/README.md,提交 952a0bf
工具
0版本歷史
3- v0.2.2最新Oct 2, 2026
- v0.2.1Sep 30, 2026
- v0.1.4Sep 29, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分