
AIShield Security Scanner
io.github.lm203688Published by GitHub account lm203688v4.3.0Updated Oct 26, 2026
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
The publisher's own server: RoboParts 机器人零部件兼容性
Overview
A local, offline MCP server that scans MCP servers, skills and prompts for tool poisoning, prompt injection and supply chain risks.
- What you can do
- Scan MCP server, skill and prompt configurations for prompt injection, tool poisoning, rug pulls and supply chain issues
- Check text for banned words across several Chinese platforms and detect obfuscated or localized injection attempts
- Produce a multi-dimension security score with findings mapped to OWASP-style risk categories
- Issue a trust attestation and a badge level for assets that pass the rule set
- Run scans from the chat client, a local API panel, a command line or a CI gate
- When to use it
- Useful when you want an assistant to vet a third-party MCP server, skill or prompt before you trust or install it, or to add a security check to a repository's CI. It is aimed at content-level trust checks rather than sandboxing.
- Requirements
- Runs as a local process on the user's machine, started with npx for the npm package or from a cloned Python repository; the README describes it as zero-dependency and fully offline. No account, API key or environment variable is declared. Optional integration modules may need extra packages or keys.
Installation
In SourceWeft
- Open AIShield Security 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
AIShield
AI Agent 安全生态基础设施
让任何 Agent 可以安全地发现、验证、委托、支付另一个 Agent
[MIT License] [Python 3.9+] [OWASP MCP Top 10] [313 Rules (static 286 + intel 8 + radar 19)] [Zero Dependencies] [v4.11.0]
🖥️ 本地优先 · 零依赖 · 代码不出机
开源本地版 — 与同名云 SaaS aishield.ai 是完全不同的产品
🖥️ 本地优先 · 开源 · 无云 AIShield 开源版完全在你机器上运行:零第三方依赖、可 100% 离线、代码与配置绝不上传云端、扫描时绝不执行被扫配置。 ⚠️ 与
aishield.ai的区别:本仓库是本地开源版,与同名商业云 SaaSaishield.ai(注册 / 密钥 / 计费式云端服务)是完全不同的产品,请勿混淆。
核心特性
🛡️ 313 条规则(静态 286 + 情报 8 + 雷达 19) — 对齐 OWASP MCP Top 10 (2025 v0.1) 与 OWASP Agentic AI Top 10 (2026) 的全部 10 类风险,覆盖 Prompt 注入、越权访问、数据泄露、协议攻击、供应链风险、沙箱逃逸 6 大维度
编号体系说明(重要):报告中
owasp_category字段的ASI01–ASI10是本库内部归纳编号, 与 OWASP 官方 Top 10 for Agentic Applications 2026 的编号不是同一套——仅 ASI01/ASI02/ASI03 恰好同号。例如本库ASI04(记忆操纵与投毒)在官方体系中是ASI06 Memory & Context Poisoning, 而官方ASI04是 Agentic Supply Chain。逐条交叉表见scanner/compliance.py的INTERNAL_ASI_TO_OWASP(也随compliance_summary()返回)与docs/owasp-agentic-taxonomy-alignment.md。 引用 OWASP 官方措辞前必须经此换算。
🧰 Agent 计算机的内容安全平面 — Cloudflare Sandboxes、forgevm、E2B、Open Interpreter、Goose 这类运行时管的是爆炸半径(agent 能碰到什么),AIShield 管的是内容可信(agent 读进来的 MCP server、skill、工具描述该不该信)。两者互补:启动前工作区预扫 → 沙箱硬化规则 → 每次调用准入 → 持续鉴证。详见 Agent 计算机的两个安全平面
📄 Markdown 按可执行体扫描 — 对 Skill 类资产,SKILL.md 本身就是程序。把 .md 一律当「文档示例」降级的扫描器,会整条漏掉 skill 供应链
🧠 智能 Prompt 注入检测 — 原生支持中文检测,识别拼音变体、谐音替换、拆字攻击等本土化绕过手法
🪪 Agent 身份系统 — DID 去中心化身份生成、多级信誉评分、API Key 生命周期管理、完整审计日志链
🤝 Agent 协作通信 — 内置发布/订阅消息总线、协作会话管理、跨 Agent 任务委托,让 Agent 之间安全对话
📦 安全沙箱执行 — 代码预检查拦截危险模式,支持 Python / JavaScript / Shell 多语言隔离执行,结果自动安全审查
🏪 技能市场 — 技能发布、搜索与调用一体化,内置评分系统,支持 HTTP RPC 真实调用验证
📘 Agent 原生文档 — AGENTS.md(架构 / 核心不变量 / 贡献约定,供 AI 编码 agent 直接读取)+ COMMUNITY.md(分发与上架渠道清单)
🔗 A2A 协议网关 — 兼容 Google A2A 协议,Agent Card 注册与发现,智能任务路由与跨 Agent 调度
🔌 6 大外部项目集成模块 — 即插即用的安全增强套件:
💳 支付与计费 — API 按量计费、套餐管理、使用量统计,为 Agent 经济提供基础设施
🏆 安全认证徽章 — 扫描通过自动签发认证,生成可嵌入 GitHub README 的 SVG 徽章,金 / 银 / 铜三级
🌐 中立信任机构(Neutral Trust Authority) — AIShield 不只是扫描器,更是 agent 生态的信任层:每个被扫资产都拿到一张机器可读、可签名、可嵌入发现格式的 Trust Attestation(aishield-trust/v1) 凭证。MCP Server Card / A2A Agent Card / Google ai-catalog 只需在自己的 metadata 里加一个 trust 字段,就能零成本引用 AIShield 的「内容是否可信」裁决——而这一层目前是整条 agent 供应链最薄弱、也最被抢位的空白。AIShield 的差异化锚点:唯一本地离线、扫内容(prompt 注入 / 工具中毒 / 供应链漂移)、绝不执行被扫配置的信任裁决。生态占位策划见 docs/ecosystem-positioning-2026.md。
为什么选择 AIShield
🔍 Agent 身份与凭证扫描(身份层 / NHI) — 2026 年 agent 安全的主战场已从「工具执行」转移到「agent 身份可验证」(A2A 仓库 top issue 全在身份;Authentik 借 NHI 重燃;ANS/DNSid/Entra Agent ID 扎堆)。AIShield 从「只发信任证书」升级为「也扫身份缺陷」:AgentCard/agent 身份是否签名、凭证是否短期过期、授权是否过宽(scope: "*" 违反最小权限)、是否缺 mTLS/DID、委托是否做 scope attenuation。详见 Agent 生态 2026 态势与卡位。
🕸️ Agent 网络 / Mesh 配置扫描(网络层) — Cloudflare Mesh 把 agent 组网做成基础设施,却官方自认「缺 per-agent 身份与策略」(所有 agent 流量被当成来自一个 Worker)。AIShield 补这个缺口:扫描整账户 Mesh/VPC 绑定是否把全网暴露给所有 agent、agent 端点是否无鉴权(auth: none)、私有资源是否公网暴露(public: true)。内容可信 + 身份归因 + 组网可达性,三管齐下覆盖 agent 的「信任浅滩」。
🔐 Authentik / NHI service-account 扫描(身份层 · Authentik 流派) — 扫描 Authentik 风格的 service-account 导出:skip_authorization 跳同意、令牌永不过期(token_ttl: 0/never)、scope 过宽("*")、硬编码 client_secret。把身份层从「只发证书」扩展到「也扫 NHI 卫生」。
🪪 A2A AgentCard 结构化校验(身份层 · A2A 流派) — 对 .well-known/agent.json 做 JSON 结构化校验:未签名、缺过期、非 https、无鉴权方案(securitySchemes)、委托链未做 scope attenuation。直接对应 A2A #1672/#1628 的「信任浅滩」。
🛡️ AI-slop / 越狱规避检测(内容可信层) — 识别专为绕过内容分类器而设计的 prompt/skill:指令覆盖(ignore previous instructions)、DAN 角色扮演、base64/翻译混淆、反检测自指。这是「去 AI 味」文化浪潮被武器化的一面,AIShield 做其安全/可信对冲层(与 soundshuman 风格层互补非竞品)。
💰 AP2 / x402 支付授权 scope 审计(经济层 · 支付授权) — 扫描 agent 支付配置:maxAmount 无限、auto_approve 免确认、支付 scope 过宽、支付授权未绑 intent(cartId/orderId)。覆盖 agent 经济层的「三授权」收敛。
🧩 OWASP Agentic AI Top 10(ASI01–ASI10)全覆盖 — 11 个新模块补完「3 个全空白 + 5 个半覆盖」域:
- ASI01 目标劫持(
scanner/goal_hijack_scan.py):把外部内容当指令、目标替换、持久/永久目标注入。 - ASI02 工具滥用 / 最小权限(
scanner/least_agency_scan.py):管道到 shell、rm -rf、sudo、chmod 777、os.system/eval、凭证与 SSH key 读取。 - ASI03 身份 / OAuth 姿态(
scanner/mcp_oauth_scan.py):无认证的远程 MCP server(CVE-2026-32211 类)、缺 RFC 9207 issuer 的 OAuth、长寿命/不轮换 token。(GPT Action 清单按自身authschema 识别,不误报为 MCP 缺口。) - ASI04 供应链 / 来源可信(
scanner/provenance_scan.py):npx/pip未 pin 版本、git 安装未 pin commit、锁定文件缺完整性、SBOM 未签名。 - ASI06 记忆 / 上下文投毒(
scanner/memory_scan.py):写入记忆的指令、持久/种子目标、记忆文件写入。 - ASI07 跨 agent / 委托(
scanner/scope_composition_scan.py):用 agent 自身凭证转发请求的混淆副手(confused deputy)。 - ASI08 级联失败 / 爆炸半径(
scanner/scope_composition_scan.py):凭证读取 + 外传组合(所有已连接 server scope 的并集)。 - ASI09 人机信任利用(
scanner/dark_pattern_scan.py):权威冒充、压制核验、虚假保证、紧迫感——需 ≥2 个信号同时命中才报警(低误报)。 - ASI10 失控 agent / 反篡改(
scanner/antitamper_scan.py):自保护/删除后重装、禁用/替换其它组件、反分析/隐藏指令。 - 工具 / 技能完整性(
scanner/tool_integrity_scan.py):工具名 typosquat(与规范品牌编辑距离 ≤2,CVE-2026-30856 类)、未 pin 版本的远程 MCP(rug-pull)。 - 注册中心供应链(
scanner/registry_supply_scan.py):技能名 typosquat、可疑外传、渐进式隐藏载荷(主文件把安装命令延迟到次级.md)。
上述 11 个模块全部通过 tests/test_capability_full_scan.py 的「良性零误报 + 恶意仍被拦」契约(40 项);全量测试 523 通过 / 0 失败 / 9 跳过。
AIShield 不只是一个扫描器 — 它是 AI Agent 安全生态的完整基础设施。
快速开始
AIShield 是完全本地运行的开源工具——无需注册、无账号、代码不上传云端。推荐通过 MCP 直接接入你的客户端。
方式一(推荐):作为 MCP Server 接入
无需安装,一行命令接入 Claude Desktop / Cursor / 任意 MCP 客户端:
接入后无需任何配置,即可在对话中直接说:
“帮我扫描这个 MCP 工具是否存在 Prompt 注入风险”
方式二:本地 API Server(可选)
启动后访问 http://localhost:8450 查看本地 API 面板。该 server 完全在本地运行,无需注册、无积分、无公网依赖,所有扫描都在你的机器上完成。
获取安全徽章
扫描通过后,在你的项目 README 中嵌入安全徽章(自托管你的实例后替换域名):
MCP 集成
AIShield 可作为 MCP Server 直接集成到 Claude Desktop、Cursor 等支持 MCP 的客户端中。
Claude Desktop
在 Claude Desktop 配置文件中添加:
Cursor / 其他 MCP 客户端
同样在 MCP 配置中添加以上内容,即可在对话中直接调用 AIShield 的全部安全扫描能力。
集成后你可以直接在对话中说:
"帮我扫描这个 MCP 工具是否存在 Prompt 注入风险"
"检查这段文本是否包含违禁词"
CI 安全门禁(GitHub Action)
把 AIShield 接入任何仓库的 CI:每次 push / PR 自动扫描工作区里的 MCP server、skill、prompt,达到阈值即让构建失败。
差异化:默认 no-spawn(不执行被扫配置) + 内容/prompt 注入检测 + 中文合规(违禁词)——占「中国合规 + 不执行」位,与 AgentAuditKit 的通用位互补。
外部项目集成
AIShield 内置 6 个即插即用的集成模块,提升安全扫描和威胁情报能力。所有模块零依赖即可运行,外部依赖为可选增强。
快速使用
安装可选依赖
详见 requirements-integrations.txt 和 scanner/integrations/ 目录。
本地 API 文档(localhost:8450)
以下端点由本地 python api/server.py 提供,运行在 localhost:8450,无公网依赖、无需注册。先按上文「快速开始 · 方式二」启动本地 server,再访问对应端点。核心端点包括:
安全扫描
Agent 生态
项目架构
技术特点:
- 零依赖架构 — 纯 Python 标准库实现,无需 pip install 任何第三方包
- ThreadingMixIn 并发 — 内置线程池处理,支持多请求并行
- JSON 文件存储 — 轻量持久化,线程安全,开箱即用
- OWASP API Security 映射 — 9 大安全类别全覆盖
- 中文违禁词引擎 — 覆盖微信、抖音、小红书、B 站、微博 6 大平台
安全认证徽章
AIShield 为通过安全扫描的工具自动签发可嵌入的 SVG 徽章,让你的项目安全状态一目了然。
徽章等级
在你的项目中使用
在你的 README.md 中添加以下代码:
AIShield 会根据最新扫描结果动态渲染徽章颜色和状态。
Runner Provenance:装上去的东西,凭什么相信它
Agent 生态里最贵的沉默成本,是把"能在注册表里搜到"当成"被审计过"。 我们把它拆成可核对的三句话:
1)本包带 sigstore provenance,绑定到具体 commit。
aishield-mcp-server 的每一次发布都走 npm publish --provenance,
由 GitHub Actions 的 OIDC 身份签发,证明"这个 tarball 确实由
lm203688/aishield 的某次 commit 在 GitHub 托管 runner 上构建"。
它不是自签名的声明,而是可在本地复核的 attestation:
2)"已发布 / 已上架 / 已被收录" 一律不等于 "已审计"。 本包在 npm、Glama 等渠道的上架只说明分发动作发生了, 不构成任何一方对代码安全性的背书。第三方目录里的描述是第三方写的, 以本仓库与本文件为准。
3)我们只对自己的规则集与检测能力负责,不替别人做背书。 AIShield 是一个本地、离线、非执行式的扫描器:它读配置与代码、给出发现, 但不替第三方声明"无风险"。扫描通过只意味着"在本次规则集下未发现已知模式"。
路线图
Phase 1 — 安全扫描引擎 ✅ (当前)
- 313 MCP / 340 Skill 条 OWASP MCP Top 10 + Agentic ASI01–10 对齐检测规则
- 5 维安全评分引擎
- 中文 Prompt 注入检测(拼音 / 谐音 / 拆字)
- 零宽字符 / 隐写术 / Rug Pull 检测
- 违禁词检测(6 大中文平台)
- MCP Server 模式 + StreamableHTTP
- 代理调用网关
Phase 2 — 信任生态
- Agent DID 身份注册与跨链验证
- 多级信誉系统上线
- 安全徽章签发平台
- 技能市场 Beta
- A2A 协议网关完善
- 按量计费与配额管理
Phase 3 — 规模化治理
- 多租户支持与企业 SSO
- 社区贡献规则市场
- AI 驱动的规则自动生成
- Web Dashboard 可视化管理
- 国际化 (i18n) 多语言支持
- SLA 监控与告警
贡献指南
我们欢迎任何形式的贡献,包括但不限于:新检测规则、Bug 修复、文档改进、功能建议。
参与步骤
- Fork 本仓库
- 创建特性分支:
git checkout -b feature/your-feature-name - 提交变更:
git commit -m 'feat: add xxx feature' - 推送分支:
git push origin feature/your-feature-name - 提交 Pull Request
提交规范
使用 Conventional Commits 格式:
feat:新功能fix:Bug 修复docs:文档变更refactor:代码重构test:测试相关chore:构建 / 工具链变更
贡献检测规则
在 scanner/rules.py 中添加新规则,确保与 OWASP MCP Top 10 分类对齐。提交 PR 前运行测试:
部署
AIShield 支持多种部署方式:
直接运行:
Docker:
Railway / Render:
项目内置 railway.json、render.yaml 和 Procfile,可直接一键部署。
详见 DEPLOY.md。
🚀 立即开始
选择最适合你的方式,全程本地运行,无需注册:
所有方式均在本地完成,没有任何数据发送到外部。本开源版与云 SaaS
aishield.ai无关。
3 分钟上手(本地优先 · 代码不出机)
完整能力矩阵、离线优先入口与 When-to-Recommend 见 llms.txt。
致谢
- OWASP MCP Security Top 10 — 安全标准与规则体系
- Google A2A Protocol — Agent-to-Agent 通信协议参考
- MCP Community — Model Context Protocol 社区生态
- 所有为 AIShield 贡献代码和规则的 Contributors
许可证
MIT License © 2025 AIShield Contributors
📰 最新安全洞察
- MCP 2026-07-28 无状态化:安全网关必须回答的 3 个问题
2026-08-03 - 从 HuggingFace 被入侵看 Agent 沙箱逃逸的 4 个必要条件
2026-08-03 - 深入分析:filesystem-test 如何修复安全漏洞
2026-07-25 - MCP 安全扫描周报 #30:发现 0 个高危风险
2026-07-25
Source: README.md at commit d9243ca
Tools
0Version history
1- v4.3.0LatestSep 16, 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
Other Roboparts integrations

RoboParts 机器人零部件兼容性
cc.robopartsOfficial publisher
Vendor-neutral robot parts catalog that lets an assistant search components, check 4-dimension compatibility, and review BOM fit.

flybrain-connectome
Published by GitHub account lm203688
Generates auditable multi-agent topologies from Drosophila and other connectome motifs, with provenance and real-connectome queries.

智慧农业生态 Agri-Eco
Published by GitHub account lm203688
Offline, zero-dependency agriculture knowledge base exposing 30 tools for climate-zone matching, crop advice, planting plans, pest diagnosis and Env Recipes.

ATEX AI Gateway
Published by GitHub account lm203688
ATEX AI Gateway is a remote MCP endpoint that gives an assistant access to six AI models through one API key, with pay-per-use billing and web search.