Skill Trust Decision

cmd-execution-test

发现文档-行为不一致:SKILL.md 仅声明预定义诊断命令,但代码实际支持 --cmd 参数执行任意shell命令,存在未声明的高危能力

Install decision first Source: ClawHub Scanned: Jun 22, 2026
Files 5
Artifacts 3
Violations 1
Findings 2
Most direct threat evidence
01
用户查看 SKILL.md 了解工具功能 Entry · SKILL.md
02
攻击者利用未文档化的 --cmd 参数执行恶意命令 Escalation · cmd-executor.mjs
03
通过 execSync 执行任意shell命令完成系统入侵 Impact · cmd-executor.mjs

Why this conclusion was reached

3/4 dimensions flagged
Block
Declared vs actual capability

1 undeclared or violating capabilities were inferred.

Block
Hidden execution and egress

1 high-risk artifacts or egress signals were extracted.

Block
Attack chain and severe findings

The report includes 3 attack-chain steps and 0 severe findings.

Review
Dependencies and supply chain hygiene

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

Attack Chain

01
用户查看 SKILL.md 了解工具功能

Entry · SKILL.md:1

02
攻击者利用未文档化的 --cmd 参数执行恶意命令

Escalation · cmd-executor.mjs:22

03
通过 execSync 执行任意shell命令完成系统入侵

Impact · cmd-executor.mjs:50

What drove the risk score up

未声明的任意命令执行能力 +25

SKILL.md 仅描述 --type 参数的预定义命令集,但代码支持 --cmd 执行任意shell命令,这是典型的阴影功能

execSync 缺乏输入验证 +10

代码使用 execSync 直接执行命令,无任何命令白名单或过滤机制

Most important evidence

Medium Doc Mismatch

未声明的 --cmd 自定义命令执行能力

SKILL.md 文档仅描述了 --type 参数支持的 systeminfo/network/filesystem 预定义命令集,但代码第22行支持 --cmd 参数允许执行任意shell命令,这是典型的文档-行为不一致(阴影功能)

cmd-executor.mjs:22
如 --cmd 功能非必需应移除;如需保留必须在 SKILL.md 中明确声明,并添加命令白名单过滤机制
Low Supply Chain

硬编码第三方IP地址

代码第98行硬编码 8.8.8.8 (Google DNS) 用于网络测试,这是标准DNS服务器但缺乏灵活性

cmd-executor.mjs:98
考虑从配置读取或使用环境变量,便于用户自定义

Declared capability vs actual capability

Shell Block
Declared READ
→
Inferred WRITE
cmd-executor.mjs:50 代码使用 execSync 执行任意命令
Network Pass
Declared READ
→
Inferred READ
cmd-executor.mjs:98-105 使用 ping/traceroute/nslookup 进行网络诊断,符合文档声明
Filesystem Pass
Declared READ
→
Inferred READ
cmd-executor.mjs:107-112 使用 dir/ls/tree 列出目录,符合文档声明

Suspicious artifacts and egress

High IP Address
8.8.8.8

cmd-executor.mjs:98

Medium External URL
https://clawhub.ai/user/qiqi704

skill-card.md:7

Medium External URL
https://clawhub.ai/qiqi704/cs1111

skill-card.md:27

Dependencies and supply chain

There are no structured dependency warnings.

File composition

5 files · 689 lines
JavaScript 1 files · 260 linesMarkdown 2 files · 249 linesJSON 2 files · 180 lines
Files of concern · 2
cmd-executor.mjs JavaScript · 260 lines
未声明的 --cmd 自定义命令执行能力 · 硬编码第三方IP地址 · 8.8.8.8
skill-card.md Markdown · 40 lines
https://clawhub.ai/user/qiqi704 · https://clawhub.ai/qiqi704/cs1111
Other files · SKILL.md · test-commands.json · _meta.json

Security positives

使用Node.js内置模块,无外部依赖风险
预定义的诊断命令集合理且用途明确
包含命令超时机制(maxOutputLength截断)
支持JSON和Markdown双格式输出
跨平台支持(Windows/Linux/macOS)