Skill Trust Decision

agent-runtime

Agent Runtime 框架代码本身无恶意行为,但存在文档-行为不一致(未声明的内置工具)属于轻微阴影功能,以及权限控制在 SKILL.md 中被强调但实现为直接允许(简化版)。

Install decision first Source: ClawHub Scanned: Apr 6, 2026
Files 2
Artifacts 0
Violations 3
Findings 3

Why this conclusion was reached

1/4 dimensions flagged
Block
Declared vs actual capability

3 undeclared or violating capabilities were inferred.

Pass
Hidden execution and egress

No obvious high-risk egress or execution signals were found.

Pass
Attack chain and severe findings

There is no explicit malicious chain in the report.

Review
Dependencies and supply chain hygiene

Dependency information is incomplete, so supply-chain confidence stays limited.

What drove the risk score up

文档-行为差异 +15

SKILL.md 完全未声明内置工具(read_file/bash/search/todo),但代码中实现并注册

权限控制名不副实 +10

SKILL.md 强调'权限控制',但 SimpleHookRunner 实现直接允许(allowed:true, denied:false),无实际拦截

bash 工具权限宽松 +5

内置 bash 工具 permission='danger' 但 SKILL.md 未声明其存在,存在潜在的权限提升风险

Most important evidence

Medium Doc Mismatch

内置工具未在文档中声明

代码内置了 read_file、bash、search、todo 四个工具,且注册到运行时供用户调用,但 SKILL.md 完全没有提及这些工具的存在,仅描述了框架架构。

scripts/agent-runtime.mjs:137
在 SKILL.md 的工具列表或 allowed-tools 部分明确列出内置工具及其用途和权限级别。
Medium Priv Escalation

权限控制实现为空壳

SKILL.md 强调'权限级别控制'、'权限控制'为核心功能,但 SimpleHookRunner 的 runPreToolUse 和 runPostToolUse 均直接返回 { allowed: true, denied: false },没有任何实际拦截逻辑。

scripts/agent-runtime.mjs:94
实现真实的权限检查逻辑,参照 SKILL.md 中声明的 PermissionLevel (READ/WRITE/DANGER/ADMIN) 进行工具过滤。
Low Priv Escalation

bash 工具未声明且权限较高

bash 工具 permission='danger'、shell:true,允许执行任意 shell 命令,且未在 SKILL.md 声明,存在潜在权限提升风险。

scripts/agent-runtime.mjs:153
如非必需,移除内置 bash 工具;如需保留,应在文档中明确声明并限制 agentTypes 范围。

Declared capability vs actual capability

Filesystem Block
Declared NONE
→
Inferred READ
scripts/agent-runtime.mjs:143 内置 read_file 工具调用 fs.readFileSync
Shell Block
Declared NONE
→
Inferred WRITE
scripts/agent-runtime.mjs:157 内置 bash 工具使用 spawn('cmd', ['/C', command], {shell:true})
Skill Invoke Block
Declared NONE
→
Inferred WRITE
scripts/agent-runtime.mjs:155 动态 import('child_process')

Suspicious artifacts and egress

No obvious IOC was extracted.

Dependencies and supply chain

There are no structured dependency warnings.

File composition

2 files · 610 lines
JavaScript 1 files · 508 linesMarkdown 1 files · 102 lines
Files of concern · 1
scripts/agent-runtime.mjs JavaScript · 508 lines
内置工具未在文档中声明 · 权限控制实现为空壳 · bash 工具未声明且权限较高
Other files · SKILL.md

Security positives

代码本身无恶意行为(无数据外泄、无凭证收割、无反向shell、无持久化)
框架架构清晰,有合理的组件分离(Registry/Hook/Compactor/Tracker)
无外部网络请求,无敏感路径硬编码
Usage Tracker 和 Session Compactor 实现合理