Skill Trust Decision

smoking-detection-analysis

吸烟检测技能功能正常、依赖锁定、网络目标明确;存在一处已禁用(注释)的subprocess调用和轻微的文档-实现差异(未声明本地SQLite),但无主动恶意行为。

Install decision first Source: ClawHub Scanned: Aug 15, 2026
Files 29
Artifacts 10
Violations 0
Findings 4

Why this conclusion was reached

0/4 dimensions flagged
Pass
Declared vs actual capability

Declared resources and inferred behavior are broadly aligned.

Review
Hidden execution and egress

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

Pass
Attack chain and severe findings

There is no explicit malicious chain in the report.

Pass
Dependencies and supply chain hygiene

Dependencies are present but no obvious high-risk issue stands out.

What drove the risk score up

subprocess 代码已注释但未删除 +15

AgentSkill.ai_chat() 包含被注释的 subprocess.run(cmd) 调用,若取消注释将以当前进程权限执行任意 prompt,潜在 RCE

阴影功能:本地 SQLite 数据库 +5

SKILL.md 未声明技能会创建本地 SQLite 数据库 (smyx-common-claw.db) 并存储用户凭证(token/open_token),但行为本身合理

依赖锁定 +-5

所有第三方依赖(pydash, SQLAlchemy, PyYAML)均指定精确版本,无版本泛匹配

外部网络目标明确 +-5

仅访问 lifeemergence.com 相关域名,无可疑境外 IP 或动态域名

Most important evidence

Medium RCE

已禁用的潜在 RCE 代码路径

skills/smyx_common/scripts/skill.py 第 55 行附近,AgentSkill.ai_chat() 方法包含被注释掉的 subprocess.run() 调用。若取消注释,攻击者可通过 prompt 参数注入任意 shell 命令(session_id 也来自 sys.argv[0] 解析,同样可控),构成远程代码执行。

skills/smyx_common/scripts/skill.py:55
彻底删除该代码块而非仅注释,subprocess 调用不属于吸烟检测的合理功能
Low Doc Mismatch

本地 SQLite 数据库未在文档中声明

技能在 ~/.workspace/data/ 下创建 smyx-common-claw.db 数据库(通过 dao.py),存储 User 记录(含 token、open_token),SKILL.md 未提及此持久化行为。数据库内容为当前技能会话的身份凭证,不外传,但文档缺失构成信息不对称。

skills/smyx_common/scripts/dao.py:55
在 SKILL.md 资源索引中补充说明本地数据库用途
Low Sensitive Access

读取非声明环境变量

ConstantEnum.init() 读取 OPENCLAW_SENDER_OPEN_ID、OPENCLAW_SENDER_USERNAME、FEISHU_OPEN_ID 环境变量,这些变量在 SKILL.md 中未被声明为技能依赖。读取行为本身无害(用于身份识别),但属于越权声明。

skills/smyx_common/scripts/config.py:117
在 SKILL.md 依赖声明中列出所需环境变量
Info Priv Escalation

smyx_api_key.txt 凭证存储

OpenIdUtil.get_api_key_file_open_id() 读取 data/smyx-api-key.txt 作为身份源,该文件若被攻击者写入恶意内容可造成身份混淆,但无证据表明存在主动写入恶意内容的路径。

skills/smyx_common/scripts/util.py:275
确保 data 目录权限最小化(600)

Declared capability vs actual capability

Network Pass
Declared READ
→
Inferred READ
skills/smyx_common/scripts/util.py:163-165 访问 https://lifeemergence.com 相关 API
Filesystem Pass
Declared READ
→
Inferred WRITE
skills/smyx_common/scripts/dao.py:55 创建并写入 ~/.workspace/data/smyx-common-claw.db
Shell Pass
Declared NONE
→
Inferred WRITE
skills/smyx_common/scripts/skill.py:55 已注释的 subprocess.run(cmd),若启用可执行任意命令
Environment Pass
Declared NONE
→
Inferred READ
skills/smyx_common/scripts/config.py:117-122 读取 OPENCLAW_SENDER_OPEN_ID, OPENCLAW_SENDER_USERNAME, FEISHU_OPEN_ID

Suspicious artifacts and egress

Medium External URL
https://lifeemergence.com/sample.html

SKILL.md:43

Medium External URL
http://192.168.1.234:9601/smyx-open-api

skills/smyx_common/scripts/config-dev.yaml:2

Medium External URL
http://192.168.1.234:4100

skills/smyx_common/scripts/config-dev.yaml:3

Medium External URL
http://192.168.1.234:7070/jeecg-boot-xzgz

skills/smyx_common/scripts/config-dev.yaml:4

Medium External URL
https://livemonitortest.lifeemergence.com/smyx-open-api

skills/smyx_common/scripts/config-test.yaml:2

Medium External URL
http://livemonitortest.lifeemergence.com

skills/smyx_common/scripts/config-test.yaml:3

Medium External URL
https://healthtest.lifeemergence.com/jeecg-boot-xzgz

skills/smyx_common/scripts/config-test.yaml:4

Medium External URL
https://lifeemergence.com/jeecg-boot-xzgz

skills/smyx_common/scripts/config.yaml:4

Medium External URL
https://open.lifeemergence.com/smyx-open-api

skills/smyx_common/scripts/config.yaml:5

Medium External URL
http://livemonitor.lifeemergence.com

skills/smyx_common/scripts/config.yaml:6

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
pydash 8.0.6 requirements.txt No 精确版本锁定
SQLAlchemy 2.0.46 requirements.txt No 精确版本锁定
PyYAML 6.0.3 requirements.txt No 精确版本锁定
requests >=2.28.0 SKILL.md dependencies No SKILL.md 声明依赖但 scripts 中直接使用(Python 内置或上级依赖传递),无版本上限

File composition

29 files · 2735 lines
Python 18 files · 2481 linesMarkdown 3 files · 219 linesYAML 6 files · 29 linesText 2 files · 6 lines
Files of concern · 5
skills/smyx_common/scripts/util.py Python · 718 lines
smyx_api_key.txt 凭证存储
skills/smyx_common/scripts/config.py Python · 399 lines
读取非声明环境变量
skills/smyx_common/scripts/dao.py Python · 499 lines
本地 SQLite 数据库未在文档中声明
SKILL.md Markdown · 179 lines
https://lifeemergence.com/sample.html
skills/smyx_common/scripts/skill.py Python · 85 lines
已禁用的潜在 RCE 代码路径
Other files · smoking_detection_analysis.py · skill.py · smyx_analysis.py · api_service.py · api_service.py · config.py +1

Security positives

所有 Python 依赖(pydash==8.0.6, SQLAlchemy==2.0.46, PyYAML==6.0.3)均锁定精确版本,无版本泛匹配
无 base64 编码执行、无 eval()、无明显的混淆代码
网络目标明确:仅访问 lifeemergence.com 相关域名(含 dev/test/prod 三套环境配置,符合正常 CI/CD)
数据库强制重定向到 workspace data 目录,防止技能污染 Agent 系统路径
subprocess 代码处于完全注释状态,不在执行路径中
文件上传经过 MIME 类型检测和大小校验(最大 10MB)
API 响应校验:检查 success 字段、401/402 状态码处理完善