Skill Trust Decision

omie-energy

技能主体为合法 OMIE 电力价格工具,但 control 命令通过 shell=True 执行用户提供的 on/off 命令,文档虽有警告但仍存在命令注入风险;requirements.txt 无版本锁定存在供应链隐患。

Install decision first Source: ClawHub Scanned: Jun 20, 2026
Files 5
Artifacts 1
Violations 0
Findings 3
Most direct threat evidence
01
用户通过 skill 调用 control 命令设置智能家居设备 Entry · omie_energy.py
02
run_cmd 将 on-command/off-command 参数拼入 shell 字符串 Escalation · omie_energy.py
03
subprocess.run(cmd, shell=True) 执行任意命令导致 RCE(需 --execute 标志) Impact · omie_energy.py

Why this conclusion was reached

1/4 dimensions flagged
Pass
Declared vs actual capability

Declared resources and inferred behavior are broadly aligned.

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 1 severe findings.

Review
Dependencies and supply chain hygiene

2 dependency or supply-chain issues need attention.

Attack Chain

01
用户通过 skill 调用 control 命令设置智能家居设备

Entry · omie_energy.py:217

02
run_cmd 将 on-command/off-command 参数拼入 shell 字符串

Escalation · omie_energy.py:225

03
subprocess.run(cmd, shell=True) 执行任意命令导致 RCE(需 --execute 标志)

Impact · omie_energy.py:225

What drove the risk score up

shell=True 执行用户提供的命令 +20

command_control 中的 run_cmd(cmd, shell=True) 将 on-command/off-command 参数直接拼入 shell,文档虽有'Trusted input only'警告但无实际防护

requirements.txt 无版本锁定 +15

OMIEData 和 pandas 均无版本约束,存在依赖劫持风险

无敏感行为但边界宽 +10

load_local_env_file 读取本地 .env(仅配置),load_home_config 读写 ~/.config,均在功能范围内但权限边界较宽

Most important evidence

High RCE

on/off 命令通过 shell=True 执行任意命令

run_cmd 函数使用 subprocess.run(cmd, shell=True, check=True) 将用户提供的 --on-command 和 --off-command 参数直接拼入 shell 字符串执行。虽然 SKILL.md Safety 章节警告了'Trusted input only',但无技术防护机制(如参数白名单、路径限制),若 skill 被恶意注入或用户被欺骗传入恶意命令,将导致 RCE。

omie_energy.py:225
改用列表传参 subprocess.run(cmd.split(), check=True) 避免 shell 解析;或限制命令只能为特定白名单路径(如 /usr/bin/ha)。
Medium Supply Chain

依赖无版本锁定

requirements.txt 中 OMIEData 和 pandas 均未指定版本,可能在 CI/部署时安装到含有漏洞的更新版本。

requirements.txt:1
添加版本约束,如 OMIEData>=1.0.0,<2.0.0 和 pandas>=1.5.0,<3.0.0。
Low Sensitive Access

读取用户主目录配置

load_home_config 读写 ~/.config/omie-energy/config.json,属于功能范围,但访问了用户主目录,若配置文件被攻击者预先植入内容可导致持久化风险(低)。

omie_energy.py:41
在文档中明确配置文件的信任边界,建议仅存储非敏感的偏好设置。

Declared capability vs actual capability

Filesystem Pass
Declared READ
Inferred READ
omie_energy.py:24-37 .env 读取; omie_energy.py:41-46 ~/.config/config.json 读写
Network Pass
Declared READ
Inferred READ
omie_energy.py:76-81 OMIEMarginalPriceFileImporter.fetch 从 omie.es 获取公开价格数据
Shell Pass
Declared WRITE
Inferred WRITE
omie_energy.py:225 subprocess.run(cmd, shell=True, check=True) — 文档声明了 control 命令可执行 shell
Environment Pass
Declared READ
Inferred READ
omie_energy.py:53 env_nonempty 读取 OMIE_AREA 等环境变量
credential_theft Pass
Declared NONE
Inferred NONE
无 SSH/AWS/密钥访问或外传
Clipboard Pass
Declared NONE
Inferred NONE
无剪贴板操作
Browser Pass
Declared NONE
Inferred NONE
无浏览器自动化
Database Pass
Declared NONE
Inferred NONE
无数据库操作

Suspicious artifacts and egress

Medium External URL
https://www.omie.es

README.md:4

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
OMIEData * pip No 无版本锁定
pandas * pip No 无版本锁定

File composition

5 files · 743 lines
Python 1 files · 396 linesMarkdown 2 files · 332 linesShell 1 files · 13 linesText 1 files · 2 lines
Files of concern · 3
omie_energy.py Python · 396 lines
on/off 命令通过 shell=True 执行任意命令 · 读取用户主目录配置
README.md Markdown · 166 lines
https://www.omie.es
requirements.txt Text · 2 lines
依赖无版本锁定
Other files · SKILL.md · run.sh

Security positives

无 base64 编码、混淆或反分析痕迹
无凭证收割、环境变量遍历或数据外泄
无未声明的文件访问(.ssh、.aws、.env 等敏感路径)
无远程脚本下载或 wget|curl 管道执行
OMIE 数据源为公开合法 API,无隐蔽 C2 通信
代码结构清晰,无阴影功能(文档与行为基本一致)
README.md 与 SKILL.md 内容一致,无 doc_deception