grok-swarm
cli.py实现了未在SKILL.md中声明的--execute参数,允许执行任意shell命令,构成明确的代码执行风险。
Why this conclusion was reached
2/4 dimensions flagged3 undeclared or violating capabilities were inferred.
1 lower-risk artifacts were extracted and still need context.
The report includes 3 attack-chain steps and 2 severe findings.
1 dependency or supply-chain issues need attention.
Attack Chain
Entry · SKILL.md:1
Escalation · bridge/cli.py:229
Impact · N/A
What drove the risk score up
cli.py的--execute参数允许执行任意shell命令,完全未在SKILL.md中声明
grok_bridge.py读取多个位置的API密钥:环境变量、~/.config/grok-swarm/config.json、~/.openclaw/*/auth-profiles.json
连接https://openrouter.ai/api/v1,存在数据外泄的理论风险
install.sh使用pip install openai>=1.0.0,未锁定具体版本
Most important evidence
未声明的shell执行功能
cli.py实现了--execute参数,允许执行任意shell命令。这是SKILL.md中完全未提及的影子功能,用户在不知情的情况下可能触发恶意命令执行。
bridge/cli.py:229 任意命令执行风险
通过--execute参数,攻击者可以执行任意shell命令,包括反弹shell、下载恶意脚本等。
bridge/cli.py:229 多处读取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 网络通信未声明
SKILL.md未提及该技能会连接外部API(https://openrouter.ai/api/v1)进行通信。用户应知情数据会被发送到第三方。
bridge/grok_bridge.py:29 依赖无版本锁定
install.sh中使用pip install openai>=1.0.0,未锁定具体版本,可能安装到存在漏洞的版本。
install.sh:51 Declared capability vs actual capability
bridge/cli.py:229-237 subprocess.run(args.execute, shell=True) bridge/grok_bridge.py:74-75 os.environ.get(OPENROUTER_API_KEY) SKILL.md声明File Writing能力,apply.py实现 bridge/grok_bridge.py:29 OpenRouter API调用 Suspicious artifacts and egress
https://openrouter.ai/api/v1 bridge/grok_bridge.py:29
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| openai | >=1.0.0 | pip | No | 无版本锁定,存在供应链风险 |
File composition
bridge/grok_bridge.py bridge/cli.py install.sh