Skill Trust Decision

cmd-execution-test

Skill 声明为系统诊断工具,但存在未记录的重大阴影功能:可通过 --cmd 参数执行任意 shell 命令,且 skill-card.md 明确承认可执行「unrestricted shell commands」。

Install decision first Source: ClawHub Scanned: 28 days ago
Files 5
Artifacts 3
Violations 1
Findings 4
Most direct threat evidence
01
用户引入skill后调用诊断功能 Entry · SKILL.md
02
攻击者通过--cmd参数注入任意命令 Escalation · cmd-executor.mjs
03
以agent权限执行恶意命令(如读取凭证、部署后门) 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 1 severe findings.

Review
Dependencies and supply chain hygiene

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

Attack Chain

01
用户引入skill后调用诊断功能

Entry · SKILL.md:1

02
攻击者通过--cmd参数注入任意命令

Escalation · cmd-executor.mjs:89

03
以agent权限执行恶意命令(如读取凭证、部署后门)

Impact · cmd-executor.mjs:52

What drove the risk score up

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

SKILL.md未提及--cmd参数,但代码允许执行任意shell命令

skill-card.md自认风险 +10

skill-card.md明确承认'can execute unrestricted shell commands'

文档-行为差异 +10

文档声称诊断工具,实际可执行RCE

Most important evidence

High RCE

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

SKILL.md文档仅列出预设的诊断命令(ipconfig, whoami, netstat等),但代码中存在--cmd参数允许执行任意shell命令,形成阴影功能。这使得skill可被滥用为命令执行工具。

cmd-executor.mjs:42-44
在SKILL.md中明确声明--cmd参数,或移除该功能改用预定义命令白名单
Medium Doc Mismatch

Skill-card.md与SKILL.md声明不一致

skill-card.md明确承认'can execute unrestricted shell commands as the agent user',但SKILL.md未提及此能力,存在文档欺骗。

skill-card.md:17
统一文档声明,SKILL.md应明确列出所有命令执行能力及其风险
Medium Priv Escalation

execSync以agent权限执行任意命令

executeCommand使用execSync直接执行命令,无沙箱、无过滤、无审计,可用于提权或横向移动。

cmd-executor.mjs:52-74
实现命令白名单验证,仅允许预定义的诊断命令
Low Sensitive Access

收集系统敏感信息

收集hostname、username、系统环境变量等信息,可能包含敏感配置。

cmd-executor.mjs:119-120
在报告中添加敏感信息标记,提醒用户谨慎处理诊断报告

Declared capability vs actual capability

Shell Block
Declared READ
→
Inferred WRITE
cmd-executor.mjs:89-93 --cmd参数允许任意命令
Filesystem Pass
Declared READ
→
Inferred READ
仅使用dir/ls读取目录内容
Network Pass
Declared READ
→
Inferred READ
仅ping/traceroute测试连通性
Environment Pass
Declared READ
→
Inferred READ
systeminfo/env命令收集环境信息

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:9

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

skill-card.md:39

Dependencies and supply chain

There are no structured dependency warnings.

File composition

5 files · 707 lines
Markdown 2 files · 267 linesJavaScript 1 files · 260 linesJSON 2 files · 180 lines
Files of concern · 2
cmd-executor.mjs JavaScript · 260 lines
未声明的任意命令执行能力 · execSync以agent权限执行任意命令 · 收集系统敏感信息 · 8.8.8.8
skill-card.md Markdown · 58 lines
Skill-card.md与SKILL.md声明不一致 · https://clawhub.ai/user/qiqi704 · https://clawhub.ai/qiqi704/skills/cs1111
Other files · SKILL.md · test-commands.json · _meta.json

Security positives

使用Node.js内置模块,无外部依赖风险
硬编码8.8.8.8用于网络连通性测试属于正常诊断行为
无数据外泄行为,仅通过stdout输出
命令执行结果有超时保护(30秒)