安全决策报告

smyx-workplace-stress-heatmap-analysis

职场压力热力图技能,声明为纯分析工具,但代码存在多处未声明行为:本地 SQLite 数据库持久化存储用户凭证和个人信息、自动注册/登录外部 API 服务、向外部域名发送视频数据和用户身份、读取 Agent 工作区环境变量进行身份解析、依赖无版本锁定。文档-行为差异明显,构成 shadow capability。

安装决策优先 来源: ClawHub 扫描时间: 18 天前
文件 29
IOC 10
越权项 4
发现 8
最直接的威胁证据
01
读取 SKILL.md 伪装成职场压力分析工具 初始入口 · SKILL.md
02
通过 OpenIdUtil.resolve_current_open_id() 读取 Agent 环境变量构建用户身份 权限提升 · skills/smyx_common/scripts/util.py
03
自动调用 sys/phoneLogin 注册/登录外部服务,凭证存储到本地 SQLite 权限提升 · skills/smyx_common/scripts/util.py

为什么得出这个结论

2/4 个维度触发
阻止
声明与实际能力

发现 4 项声明之外的能力或越权行为。

复核
隐藏执行与外联

提取到 10 个一般风险产物,需要结合上下文判断。

阻止
攻击链与高危发现

报告包含 5 步攻击链,另有 4 项高危或严重发现。

复核
依赖与供应链卫生

发现 1 项需要关注的依赖或供应链线索。

攻击链

01
读取 SKILL.md 伪装成职场压力分析工具

初始入口 · SKILL.md:1

02
通过 OpenIdUtil.resolve_current_open_id() 读取 Agent 环境变量构建用户身份

权限提升 · skills/smyx_common/scripts/util.py:280

03
自动调用 sys/phoneLogin 注册/登录外部服务,凭证存储到本地 SQLite

权限提升 · skills/smyx_common/scripts/util.py:200

04
将用户视频文件、username、open_id、tenant_code 等数据 POST 到外部 API

权限提升 · skills/smyx_common/scripts/util.py:230

05
视频内容与用户身份关联存储于外部服务器,形成数据外泄

最终危害 · skills/smyx_common/scripts/config.yaml:4

风险分是怎么被拉高的

未声明的 SQLite 数据库持久化 +15

dao.py 在 Agent 工作区 data/ 目录创建 smyx-common-claw.db,存储 username/realname/email/birthday/token/open_token 等敏感字段,SKILL.md 未声明

未声明的外部 API 数据发送 +15

视频文件、用户身份(open_id/username/tenant_code)POST 到 lifeemergence.com,SKILL.md 仅描述分析能力未披露网络通信范围

未声明的自动用户注册/登录 +10

util.py OpenIdUtil 自动调用 sys/phoneLogin 注册用户,SKILL.md 未提及自动身份创建行为

未声明的环境变量读取 +8

config.py 从 os.environ 读取 OPENCLAW_SENDER_OPEN_ID/OPENCLAW_SENDER_USERNAME/FEISHU_OPEN_ID,SKILL.md 未声明

未声明的 Agent 工作区路径扫描 +6

util.py AgentContextUtil 扫描文件系统检测工作区结构,SKILL.md 未声明 filesystem:READ 越权行为

依赖无版本锁定 +5

requirements.txt 使用 pydash>=8.0.6 等宽泛版本范围,存在供应链风险

最关键的证据

高危 敏感访问

本地 SQLite 数据库存储敏感用户凭证和个人信息

dao.py 创建 smyx-common-claw.db,在 sys_user 表中存储 username、realname、email、birthday、token、open_token 等敏感字段。数据库位于 Agent 工作区 data/ 目录,可被同一工作区其他技能访问。SKILL.md 未声明 database 能力。

skills/smyx_common/scripts/dao.py:56
在 SKILL.md 明确声明 database:WRITE 能力范围,说明数据库用途、数据保留期限和数据加密措施
高危 数据外泄

向外部 API 发送视频数据和用户凭证,未在文档中披露

RequestUtil.http_request() 将视频文件、open_id、username、tenant_code、token 等数据 POST 到外部域名 lifeemergence.com 和 open.lifeemergence.com。SKILL.md 仅描述本地分析功能,未披露外部数据传输行为。

skills/smyx_common/scripts/util.py:230
在 SKILL.md 中明确声明所有外部网络目标、数据类型和数据用途,提供数据处理协议链接
高危 凭证窃取

自动用户注册/登录行为未披露

当 TOKEN 或 OPEN_TOKEN 为空时,OpenIdUtil.resolve_current_open_id() 自动调用 /sys/phoneLogin 接口,以 auto-generate 的 username (User_xxxxxx 格式) 静默注册并登录外部服务。SKILL.md 未声明自动身份创建功能。

skills/smyx_common/scripts/util.py:200
在 SKILL.md 中明确声明 auto-registration 行为,说明默认用户名生成规则和数据保留政策
高危 敏感访问

读取 Agent 工作区环境变量进行身份推断

config.py 从 os.environ 读取 OPENCLAW_SENDER_OPEN_ID、OPENCLAW_SENDER_USERNAME、FEISHU_OPEN_ID 等 Agent 内部变量,用于解析用户身份。SKILL.md 未声明 environment:READ 能力。

skills/smyx_common/scripts/config.py:108
在 SKILL.md capabilityMap 中声明 environment:READ,说明读取的具体变量名和用途
中危 敏感访问

Agent 工作区文件系统结构扫描

AgentContextUtil.detect_current_agent_workspace() 通过扫描 __file__ 路径和 skills/ 目录标记来推断 Agent 工作区结构,提取 agent_id 等敏感信息。SKILL.md 未声明 filesystem:READ 越权行为。

skills/smyx_common/scripts/util.py:80
在 SKILL.md 中声明 filesystem:READ 能力,说明仅用于工作区定位
中危 供应链

依赖包无版本锁定

skills/smyx_analysis/requirements.txt 和 smyx_common/requirements.txt 使用 pydash==8.0.6(精确锁定),但项目依赖 requests>=2.28.0、SQLAlchemy==2.0.46(精确锁定)、PyYAML==6.0.3(精确锁定)。requests 包未锁定版本,可能引入已知漏洞。

skills/smyx_analysis/requirements.txt:1
锁定 requests 版本至最新稳定版,如 requests==2.32.3,防范已知 CVE
中危 文档欺骗

多个 config.yaml 配置文件混用,外部 URL 目标不透明

存在 config.yaml(生产)、config-dev.yaml、config-test.yaml 三个配置,分别指向 lifeemergence.com、192.168.1.234(内网 IP)、livemonitortest.lifeemergence.com 等不同环境。SKILL.md 仅声明公网地址,dev 配置暴露内网 IP 地址,且配置通过 env 参数动态加载,行为不透明。

skills/smyx_common/scripts/config-dev.yaml:2
统一配置管理,在 SKILL.md 说明各配置环境差异,明确哪些 IP/域名会被激活
低危 文档欺骗

SKILL.md 中外部演示链接指向未验证域名

SKILL.md 第 34 行引用 https://lifeemergence.com/sample.html 作为技能演示链接,该域名未在代码中实际使用,但作为信任建立手段。

SKILL.md:34
确认链接可用性,或移除不可验证的外部链接

声明能力 vs 实际能力

网络访问 阻止
声明 NONE
推断 WRITE
util.py:220-250 code
数据库 阻止
声明 NONE
推断 WRITE
dao.py:56-160 code
文件系统 阻止
声明 READ
推断 WRITE
dao.py:80-155 code; smyx_workplace_stress_heatmap_analysis.py:56-63 code
环境变量 阻止
声明 NONE
推断 READ
config.py:108-113 code
技能调用 通过
声明 WRITE
推断 WRITE
SKILL.md declares python -m scripts invocation

可疑产物与外联

中危 外部 URL
https://lifeemergence.com/sample.html

SKILL.md:34

中危 外部 URL
http://192.168.1.234:9601/smyx-open-api

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

中危 外部 URL
http://192.168.1.234:4100

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

中危 外部 URL
http://192.168.1.234:7070/jeecg-boot-xzgz

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

中危 外部 URL
https://livemonitortest.lifeemergence.com/smyx-open-api

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

中危 外部 URL
http://livemonitortest.lifeemergence.com

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

中危 外部 URL
https://healthtest.lifeemergence.com/jeecg-boot-xzgz

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

中危 外部 URL
https://lifeemergence.com/jeecg-boot-xzgz

skills/smyx_common/scripts/config.yaml:4

中危 外部 URL
https://open.lifeemergence.com/smyx-open-api

skills/smyx_common/scripts/config.yaml:5

中危 外部 URL
http://livemonitor.lifeemergence.com

skills/smyx_common/scripts/config.yaml:6

依赖与供应链

包名版本来源漏洞备注
requests >=2.28.0 pip (inherited) 无版本锁定,需升级至 2.32.x 防范已知漏洞
pydash 8.0.6 pip 精确锁定
SQLAlchemy 2.0.46 pip 精确锁定
PyYAML 6.0.3 pip 精确锁定

文件构成

29 个文件 · 2668 行
Python 18 个文件 · 2363 行Markdown 3 个文件 · 270 行YAML 6 个文件 · 29 行Text 2 个文件 · 6 行
需关注文件 · 4
skills/smyx_common/scripts/util.py Python · 718 行
向外部 API 发送视频数据和用户凭证,未在文档中披露 · 自动用户注册/登录行为未披露 · Agent 工作区文件系统结构扫描
skills/smyx_common/scripts/config.py Python · 399 行
读取 Agent 工作区环境变量进行身份推断
skills/smyx_common/scripts/dao.py Python · 499 行
本地 SQLite 数据库存储敏感用户凭证和个人信息
SKILL.md Markdown · 182 行
SKILL.md 中外部演示链接指向未验证域名 · https://lifeemergence.com/sample.html
其他文件 · skill.py · api_doc.md · smyx_analysis.py · smyx_workplace_stress_heatmap_analysis.py · api_service.py · skill.py +2

安全亮点

技能功能本身相对正常:为职场办公区提供匿名化压力分析,不做个人身份追踪
数据库路径通过 AgentContextUtil 重定向到工作区共享 data 目录,防止技能私有数据库污染
代码结构清晰,使用模块化继承(smyx_common 作为共享库,smyx_analysis/smyx_workplace 作为场景实现)
支持环境变量 OPENCLAW_WORKSPACE 显式指定工作区,具备一定可审计性
敏感配置(API_KEY/API_SECRET_KEY)在 config.yaml 中默认置空,避免硬编码凭证泄露
最小样本数保护(<3人不输出)设计合理,降低单人识别风险