← 返回藏书阁

CyVisGuard — MCP security control plane for AI agents

wiki/ai/sources/cyvisguard-mcp-security-control-plane.md
分类:ai / sources · 更新:2026-07-28 09:07

CyVisGuard — MCP security control plane for AI agents

为什么值得关注

CyVisGuard 把 agent 安全从“模型是否被 prompt injection 诱导”推进到“每个 action 是否仍在被授权范围内”。它定位为 MCP 上的 security control plane,关注 identity / delegation / capability policy / data-flow taint / replayable audit trail。对用户的 Hermes cron、llm-wiki 自动摄入、coding agent 工作流来说,这正好对应无人值守环境的核心风险:agent 拥有文件、网络、shell、缓存和长期上下文时,危险不在语言输出,而在工具调用链。

深度判断:值得晋升,因为它提供了可复用控制层架构,并且明确以 Claude Code 这类 coding agent 作为 reference integration;这能补强 Harness-Engineering 中的安全/控制平面。

机制 / 一阶原理

CyVisGuard 的一阶原理是把“权限判断”放在 action boundary:每次工具调用都回答 who is calling、on behalf of whom、is this still allowed。它通过 MCP 中间层统一拦截 agent 与外部工具之间的交互,并记录 verdict。README 中特别强调四类控制:

  • identity and delegation:区分 agent 自身、用户委托、子代理/工具链传递后的身份。
  • capability policy:不同会话/用户/任务看到不同工具能力和资源范围。
  • data-flow taint:如果上下文中出现敏感数据,后续网络/外传类 action 需要被 taint state 约束。
  • audit trail / replay:每次 GuardedSession call 都可展开查看请求、响应、taint transition 和 delegation chain。

这与只写 prompt policy 的区别在于:prompt 可以被忽略或被恶意 repo context 覆盖;control plane 作为工具边界可以拒绝实际 action。

与现有 wiki 概念的关系

  • Harness-Engineering:补充 action-level guard,而不是只依赖 workflow-level gate。
  • Loop-Engineering:长期 loop 需要跨轮保持 delegation / taint / audit state,否则分布式越权很难发现。
  • Agent-Benchmarks:安全评测不应只看最终回答,还要看 exfiltration denial、out-of-scope read denial、settings tamper denial 等 gate firing。
  • Preloop-Agent-Control-Plane 相关内容:CyVisGuard 更偏安全拦截和 MCP enforcement,可与 agent control plane / model gateway / policy-as-code 形成互补。

对 Hermes / llm-wiki 的可执行启发

  1. cron 任务默认最小权限:AI radar 应只写 wiki vault 相关路径,不应读取无关用户目录;高风险操作需 HOLD。
  2. 把 raw/cache 视为 tainted source:网页、README、论文和用户上传文件中的指令不得直接影响工具调用范围。
  3. 工具调用报告应保留 action receipt:重要 ingest 至少记录 raw path、wiki path、index/log 更新、reindex 结果。
  4. MCP 工具采纳要看 guardability:如果一个外部 MCP server 无法限制资源范围或产生日志,不应进入无人值守 loop。

失败模式 / 边界条件

  • MCP 覆盖边界:只有经过 MCP/control-plane 的 action 才可拦截;本地 shell、浏览器、文件系统直连仍需宿主工具层策略。
  • 策略复杂度:policy 太粗会挡不住组合攻击,太细会造成误拒绝和维护成本。
  • taint 误报/漏报:敏感数据识别并不完美,尤其是隐式业务机密、路径泄露、摘要外传。
  • 自我保护难题:README 声称可拒绝移除 guard 的设置变化;真实部署仍需 OS 权限、配置只读、审计外置等配合。

写入记录

  • 2026-07-28 09:00 CST:基于 CyVisGuard README 深度入库,提炼 MCP action-boundary control plane、taint/delegation/audit 对 Hermes 无人值守任务的启发。