
Agent Graph Auditor
io.github.4hmetuyar由 GitHub 帳號 4hmetuyar 發布v0.1.2更新於 Oct 24, 2026
Finds transitive excessive agency across LangGraph/CrewAI/AutoGen orchestration graphs
概覽
一個本機 MCP 伺服器,掃描 LangGraph、CrewAI、AutoGen 等 Python 多代理編排程式碼,找出可間接觸及危險工具的代代理。
- 可以做什麼
- 掃描 Python 程式碼片段、單一 .py 檔案或整個 .py 目錄,回報過度授權問題,包含跨越代理委派邊的傳遞性路徑。依類別列出危險能力目錄(程式碼執行、程序執行、檔案寫入、網路、憑證存取)。依代理、工具與委派關係建立可達圖,區分直接與傳遞性發現,並可透過命令列輸出 SARIF 供 CI 使用。
- 適用情境
- 適合審查以 LangGraph、CrewAI 或 AutoGen 建置的多代理 Python 專案,尤其是想找出看似無害、卻能委派給持有 shell 或程式碼執行工具的同仁代理的情況。也適合把代理圖檢查加入 CI。
- 執行需求
- 以 stdio 在本機執行,通常透過 npx 從 npm 套件啟動;需要 Node.js 以及取得該套件的網路存取。未宣告帳號、API 金鑰或標頭。可透過 guardbee.yml 檔案進行選用設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Agent Graph Auditor,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@guardbee/mcp-agent-graph-auditor
🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch
[npm version] [npm downloads] [License: MIT]
An MCP (Model Context Protocol) server that builds a reachability graph across a multi-agent orchestration and finds transitive excessive agency — an agent that was never directly given a dangerous tool, but can still reach one through another agent it's allowed to delegate to.
mcp-server-auditor catches an MCP server whose own tool grants shell/eval/SQL access directly. ai-code-scanner catches a single agent's tool list containing execute_command. Both of those are one hop: agent → tool. Multi-agent frameworks add a second kind of edge — delegation, group chat, function-execution routing — and a "safe-looking" agent with only a web_search tool can become dangerous the moment it's allowed to hand work off to a coworker that holds a shell tool. That two-hop path is invisible to a scanner that only looks at one agent's own tool list at a time.
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.
How the graph is built
- Extract. Framework-specific regex extractors pull agent/tool nodes and relationship edges out of the source:
has_tool(an agent's own toolset),delegates_to(CrewAIallow_delegation, LangGraphadd_edge),group_member(AutoGenGroupChatco-membership — any member's output can be routed to any other by the manager),executes_via(AutoGenregister_function's caller/executor split). - Classify. Every tool node is checked against a name-based capability catalog (code execution, process execution, filesystem write, network, credentials access) — the same kind of heuristic
ai-code-scanner's excessive-agency pattern uses, just applied to a graph of tools instead of one server's tool list. - Reach. A breadth-first search runs from every agent node. A capability tool reached via a straight
has_tooledge is a direct finding (still reported — useful even without a second agent in the picture). A capability tool reached only after crossing at least onedelegates_to/group_member/executes_viaedge is transitive — the finding this package exists for — and is always reported as critical, regardless of the tool's own base severity, because the agent holding it was never audited for it directly.
LangGraph is the most reliable target: add_node/add_edge calls are the orchestration graph in the source, no inference needed. CrewAI and AutoGen require inferring delegation from framework semantics (allow_delegation, GroupChat membership) rather than an explicit edge in the code, so treat those as heuristic — see Limitations below.
Features
- 3 frameworks: LangGraph (structural), CrewAI (heuristic), AutoGen/ag2 (heuristic)
- 7 capability rules across 5 categories (code-execution, process-execution, filesystem-write, network, credentials-access)
- Distinguishes direct (single-agent) from transitive (delegation-crossing) excessive agency — the transitive case is what no single-agent scanner in this monorepo catches
- Multi-hop aware — a 3+ agent delegation chain is found the same way a 2-agent one is
- SARIF 2.1.0 output — CI/CD integration (GitHub Code Scanning, etc.)
- Config file support via
guardbee.yml - 31 unit tests, plus end-to-end verification against realistic fixtures for all three frameworks
Quick Start
Claude Desktop / MCP Client
CLI (CI/CD)
MCP Tools
Example
researcher never holds shell_tool — but allow_delegation=True plus co-membership in the same Crew as ops means it can hand work off to an agent that does. This scanner reports:
writer — no tools, no delegation — gets no finding at all.
Configuration (guardbee.yml)
Limitations (by design)
- Single-file scope. Each file's graph is extracted independently — Python variable references don't resolve across files. A
Crew(agents=[researcher, ops])call will only connect toAgent(...)definitions found in the same file, even when scanning a whole directory. - CrewAI/AutoGen extraction is heuristic, not a real Python parser — constructor bodies are captured with a bounded text window rather than exact paren-matching (the same tradeoff
ai-code-scanner's pattern-window matching makes), and it doesn't track reassignment, conditional agent construction, or dynamically built tool lists. - AutoGen's
speaker_selection_methodisn't modeled —GroupChatco-membership is always treated as a bidirectional reachability edge, which is the conservative (over-inclusive, not under-inclusive) assumption. - Capability classification is name-based. A tool named
search_toolthat secretly shells out internally won't be flagged; a tool namedshell_tool_disabledwill be. Review findings; don't take them as ground truth. - Only Python source is scanned in v1 — LangChain/LangGraph's JS/TS API isn't covered yet.
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/agent-graph-auditor/README.md,提交 040e072
工具
0版本歷史
1- v0.1.2最新Sep 29, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分