Skill Trust Decision

grok-swarm

cli.py实现了未在SKILL.md中声明的--execute参数,允许执行任意shell命令,构成明确的代码执行风险。

Install decision first Source: Manual upload Scanned: Apr 5, 2026
Files 7
Artifacts 1
Violations 3
Findings 5
Most direct threat evidence
01
用户通过SKILL.md了解工具,误认为只是代码生成 Entry · SKILL.md
02
攻击者利用未声明的--execute参数执行任意命令 Escalation · bridge/cli.py
03
反弹shell或数据窃取 Impact · N/A

Why this conclusion was reached

2/4 dimensions flagged
Block
Declared vs actual capability

3 undeclared or violating capabilities were inferred.

Review
Hidden execution and egress

1 lower-risk artifacts were extracted and still need context.

Block
Attack chain and severe findings

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

Review
Dependencies and supply chain hygiene

1 dependency or supply-chain issues need attention.

Attack Chain

01
用户通过SKILL.md了解工具,误认为只是代码生成

Entry · SKILL.md:1

02
攻击者利用未声明的--execute参数执行任意命令

Escalation · bridge/cli.py:229

03
反弹shell或数据窃取

Impact · N/A

What drove the risk score up

未声明的shell执行能力 +35

cli.py的--execute参数允许执行任意shell命令,完全未在SKILL.md中声明

凭证读取 +15

grok_bridge.py读取多个位置的API密钥:环境变量、~/.config/grok-swarm/config.json、~/.openclaw/*/auth-profiles.json

外部API通信 +10

连接https://openrouter.ai/api/v1,存在数据外泄的理论风险

依赖无版本锁定 +5

install.sh使用pip install openai>=1.0.0,未锁定具体版本

Most important evidence

High Doc Mismatch

未声明的shell执行功能

cli.py实现了--execute参数,允许执行任意shell命令。这是SKILL.md中完全未提及的影子功能,用户在不知情的情况下可能触发恶意命令执行。

bridge/cli.py:229
删除--execute参数,或在SKILL.md中明确声明该功能为可选能力并添加警告说明。
High RCE

任意命令执行风险

通过--execute参数,攻击者可以执行任意shell命令,包括反弹shell、下载恶意脚本等。

bridge/cli.py:229
如果需要保留该功能,应使用严格的命令白名单而非直接执行用户输入。
Medium Credential Theft

多处读取API凭证

get_api_key()函数从多个位置读取API密钥:环境变量(OPENROUTER_API_KEY, XAI_API_KEY)、配置文件(~/.config/grok-swarm/config.json)、OpenClaw认证文件(~/.openclaw/*/auth-profiles.json)。这些凭证最终用于连接外部API,理论上存在外泄风险。

bridge/grok_bridge.py:62
确认凭证仅用于OpenRouter API调用,添加代码审计。建议使用专门的密钥管理服务。
Medium Doc Mismatch

网络通信未声明

SKILL.md未提及该技能会连接外部API(https://openrouter.ai/api/v1)进行通信。用户应知情数据会被发送到第三方。

bridge/grok_bridge.py:29
在SKILL.md中明确声明需要网络访问和外部API调用。
Low Supply Chain

依赖无版本锁定

install.sh中使用pip install openai>=1.0.0,未锁定具体版本,可能安装到存在漏洞的版本。

install.sh:51
锁定具体版本,如openai==1.58.0

Declared capability vs actual capability

Shell Block
Declared NONE
Inferred WRITE
bridge/cli.py:229-237 subprocess.run(args.execute, shell=True)
Environment Block
Declared NONE
Inferred READ
bridge/grok_bridge.py:74-75 os.environ.get(OPENROUTER_API_KEY)
Filesystem Pass
Declared WRITE
Inferred WRITE
SKILL.md声明File Writing能力,apply.py实现
Network Block
Declared NONE
Inferred READ
bridge/grok_bridge.py:29 OpenRouter API调用

Suspicious artifacts and egress

Medium External URL
https://openrouter.ai/api/v1

bridge/grok_bridge.py:29

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
openai >=1.0.0 pip No 无版本锁定,存在供应链风险

File composition

7 files · 1255 lines
Python 3 files · 851 linesJavaScript 1 files · 204 linesMarkdown 1 files · 89 linesShell 1 files · 84 linesJSON 1 files · 27 lines
Files of concern · 3
bridge/grok_bridge.py Python · 392 lines
多处读取API凭证 · 网络通信未声明 · https://openrouter.ai/api/v1
bridge/cli.py Python · 269 lines
未声明的shell执行功能 · 任意命令执行风险
install.sh Shell · 84 lines
依赖无版本锁定
Other files · apply.py · index.js · SKILL.md · openclaw.plugin.json

Security positives

apply.py实现了路径遍历保护(_safe_dest函数)
文件写入有dry-run模式(默认),防止意外覆盖
有进程级超时保护(index.js)
代码结构清晰,有适当的错误处理