Back to skill

Security audit

agent-comm-hub

Security checks for vulnerabilities and agentic risk

Overview

This hub needs review because access-control flaws can expose other agents’ data, forged events can bypass approvals, and its optional task notifier permits command injection.

Use an isolated evaluation environment until ownership checks, SSE authentication, event authorization and AppleScript handling are fixed. Keep the service private, disable the notifier and automatic execution, and back up the database before recovery operations. Run bundled tests only against disposable databases. Configure external executors only for approved data and destinations. Static inspection confirmed material flaws but did not exhaust every bundled file or dependency advisory; intentional theft was not established.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (8)

T09 · Insecure Skill Coding Practices

Error
Location
src/server.ts
Finding

Unauthenticated SSE subscription exposes another Agent's events and replaces its connection

Content
View full analysis

Impact

Disclosure of available message and task bodies, historical event replay, disconnection of the legitimate subscriber, and interference with delivery bookkeeping. Exploitation requires service reachability and knowledge of the target Agent ID; deployment firewall restrictions may reduce exposure.

T09 · Insecure Skill Coding Practices

Error
Location
src/server.ts
Finding

REST task listing permits cross-Agent task disclosure

Content
View full analysis

Impact

Disclosure of task descriptions, context, results, and other returned task fields across Agent boundaries.

T09 · Insecure Skill Coding Practices

Error
Location
src/server.ts
Finding

REST message listing permits cross-Agent message disclosure

Content
View full analysis

Impact

Disclosure of another Agent's message content and metadata. Omitting status returns multiple message states, not just unread messages.

T09 · Insecure Skill Coding Practices

Error
Location
src/server.ts
Finding

REST task updates permit modification of unrelated tasks

Content
View full analysis

Impact

Unauthorized completion or failure of tasks, falsified results and progress, and misleading update notifications to the task creator.

T09 · Insecure Skill Coding Practices

Warning
Location
src/server.ts
Finding

REST message updates permit alteration of another Agent's delivery state

Content
View full analysis

Impact

False read or acknowledgement state and suppression from workflows that select unread or pending messages.

T09 · Insecure Skill Coding Practices

Warning
Location
src/server.ts
Finding

Consumption-record endpoint exposes another Agent's activity records

Content
View full analysis

Impact

Disclosure of resource-processing records and activity history belonging to other Agents.

T09 · Insecure Skill Coding Practices

Error
Location
src/server.ts
Finding

Ordinary tokens can inject trusted SSE events, including forged authorization decisions

Content
View full analysis

Impact

Cross-Agent event forgery and false message/task notifications. With a known pending request ID, a forged approved authorization_resolved event releases the SDK's approval wait without a genuine administrator decision. An attacker-supplied sequence can also mark an unrelated event delivered when local delivery succeeds. This finding does not establish unrestricted host code execution.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/hub_task_runner.py
Finding

Remote task descriptions are interpolated into executable AppleScript

Content
View full analysis

Impact

Execution of attacker-controlled AppleScript, including shell-command execution through AppleScript facilities, with the runner's user privileges. The path does not depend on the victim's task executor approving the described operation.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (314)

Tainted flow: 'req' from os.getenv (line 94, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/hub_task_runner.py (reported line 100)May include surrounding context.

python
method="PATCH",
        )
        req.add_header("Content-Type", "application/json")
        with urlopen(req, timeout=10) as resp:
            return resp.status < 400
    except Exception as e:
        logger.error(f"更新任务状态失败: {e}")

Tainted flow: 'req' from os.getenv (line 77, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/hub_watcher.py (reported line 80)May include surrounding context.

python
req = Request(url)
        if HUB_AUTH_TOKEN:
            req.add_header("Authorization", f"Bearer {HUB_AUTH_TOKEN}")
        with urlopen(req, timeout=timeout) as resp:
            return resp.read()
    except Exception as e:
        logger.warning(f"HTTP GET {url} 失败: {e}")

Tainted flow: 'req' from os.getenv (line 91, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/hub_watcher.py (reported line 95)May include surrounding context.

python
req.add_header("Content-Type", "application/json")
        if HUB_AUTH_TOKEN:
            req.add_header("Authorization", f"Bearer {HUB_AUTH_TOKEN}")
        with urlopen(req, timeout=timeout) as resp:
            return resp.status < 400
    except Exception as e:
        logger.error(f"HTTP PATCH {url} 失败: {e}")

Tainted flow: 'req' from os.getenv (line 285, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/hub_watcher.py (reported line 288)May include surrounding context.

python
req = Request(self.url)
                if HUB_AUTH_TOKEN:
                    req.add_header("Authorization", f"Bearer {HUB_AUTH_TOKEN}")
                with urlopen(req, timeout=self.timeout) as resp:
                    logger.info("SSE 连接成功,开始监听...")
                    self._read_stream(resp)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The local-hub description and confidentiality boundaries do not clearly explain that host execution can send task context to external processors. The version history does name LLM and HTTP executors, which reduces suspicion of concealment, but does not clearly describe the resulting data-egress boundary or its authorization requirements.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

This is the same disclosure-boundary weakness: presenting the product as local does not adequately communicate that an executor may forward task context or complete tasks beyond the hub. Executor names appear in the changelog, but users are not given a clear privacy boundary or an explicit external-disclosure checkpoint.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 287)May include surrounding context.

md
| `src/server.ts` | 服务端入口,Express + MCP/SSE 双通道 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 290)May include surrounding context.

md
| `src/identity.ts` | Agent 注册、认证、4 级权限控制 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 294)May include surrounding context.

md
| `src/sse.ts` | SSE 推送通道 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 375)May include surrounding context.

md
- `sse.ts` 环境变量改为调用时读取(原已修复),生产默认 0;`sse-replay.test.ts` 文件级仍显式关批处理锁定 D1 契约 + 批处理专测(显式开 50ms 验证)。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 295)May include surrounding context.

md
| `src/orchestrator.ts` | 任务编排、Pipeline、质量门 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 297)May include surrounding context.

md
| `src/memory.ts` | 上下文暂存与管理 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 298)May include surrounding context.

md
| `src/security.ts` | 安全验证、CORS、Token 管理 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 299)May include surrounding context.

md
| `src/metrics.ts` | 统计指标收集 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 301)May include surrounding context.

md
| `package.json` | Node.js 依赖与版本定义 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 326)May include surrounding context.

md
| 宿主执行 | HostExecutor 契约 + 参考实现 | 新增 `client-sdk/adapters/host-executor.ts`(`LlmHostExecutor` / `HttpHostExecutor` / `defaultHostExecutor()`);`AbstractHostTaskB

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 343)May include surrounding context.

md
| 看门狗 | SQLite 结构完整性探针 | `scripts/cron_db_watchdog.sh` 新增 `quick_check` + `memories_fts` 行数漂移检查,每 10 分钟一次,仅告警(exit 6/7)不自动重启 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 355)May include surrounding context.

md
| 测试 | `p2-b-filter.test.ts` 21 项 + `p2-b-migration.test.ts` 1 项 | L1 零回归 / 各操作符 / dot path / 多条件 AND / 多规则 OR / L1∧L2 / 9 类非法条件 / 规范化幂等 / 精确退订 / 越权 / 与 P0 组合零回

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 355)May include surrounding context.

md
| 测试 | `p2-b-filter.test.ts` 21 项 + `p2-b-migration.test.ts` 1 项 | L1 零回归 / 各操作符 / dot path / 多条件 AND / 多规则 OR / L1∧L2 / 9 类非法条件 / 规范化幂等 / 精确退订 / 越权 / 与 P0 组合零回

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 363)May include surrounding context.

md
| A1 outbox-lite | `src/event-driven.ts` 的 `withEvents(business, events)` | 复用 `event_log.delivered=0` 作待发队列,**不新建表**;业务写与事件落库放【同一事务】,事务提交后才同步 `dispatchPersiste

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 368)May include surrounding context.

md
| 测试 | `tests/integration/p2-event-driven.test.ts` | 14 项跨模块集成:事务提交必达 / 回滚无幽灵事件 / 条件事件 / dispatch 幂等 / 离线补投 / D1 同步契约、MIN 到期计算 / 启动重建 / 准点释放 / 重算 / 宽限期重连 / 到期释放

Known Vulnerable Dependency: @modelcontextprotocol/sdk==1.29.0 — 6 advisory(ies): CVE-2026-111767 (MCP TypeScript SDK: Experimental tasks were not tied to the session that created); CVE-2026-111768 (MCP TypeScript SDK: One HTTP request within the default size limit could exhaust); CVE-2026-111769 (MCP TypeScript client SDK: HTTP client transports and OAuth requests followed cr) +3 more

High
Category
Supply Chain
Confidence
80% confidence
Finding

OSV returned vulnerability advisories matching the dependency's resolved version. Review the matched advisories to assess their impact.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: zod==3.25.76 — 1 advisory(ies): CVE-2023-54404 (Zod can exhaust memory while validating oversized constrained collections)

High
Category
Supply Chain
Confidence
80% confidence
Finding

OSV returned vulnerability advisories matching the dependency's resolved version. Review the matched advisories to assess their impact.

Content

No source excerpt is available for this finding.