Skill Trust Decision

token-sop

TOKEN SOP技能存在多处文档-行为不一致:文件系统写操作未声明、默认启用云端贡献且SKILL.md声称「本地存储不传敏感数据」与实际行为矛盾、session数据自动外传至外部API,虽有PII清理但整体透明度不足。

Install decision first Source: Manual upload Scanned: Apr 5, 2026
Files 32
Artifacts 2
Violations 1
Findings 5
Most direct threat evidence
High Doc Mismatch
SKILL.md 声称「本地存储不传敏感数据」但默认自动云端上传

SKILL.md 营销文案明确声明「隐私安全:工作流保存在本地,不上传敏感数据」,但 skill.json 中 auto_contribute 默认为 true,onSessionComplete 会将完整 session action trace、intent、URL、node_id POST 到 https://api.ainclaw.com/v1/lobsters/contribute。PII虽经sanitizer清理但URL、行为序列等元数据仍外传。

SKILL.md:73

Why this conclusion was reached

2/4 dimensions flagged
Block
Declared vs actual capability

1 undeclared or violating capabilities were inferred.

Review
Hidden execution and egress

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

Block
Attack chain and severe findings

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

Review
Dependencies and supply chain hygiene

1 dependency or supply-chain issues need attention.

What drove the risk score up

文件系统WRITE操作未声明 +15

local-store.ts 对 ~/.openclaw/workflows/ 执行 fs.writeFileSync/fs.readFileSync/fs.mkdirSync,skill.json permissions 和 SKILL.md 均未声明 filesystem 权限

文档-行为不一致(阴影功能) +15

SKILL.md 声称「不上传敏感数据到云端」且「断网也能用」,但 auto_contribute 默认 true,session数据自动 POST 到外部API

session数据自动外传至第三方端点 +10

onSessionComplete 将完整 action trace、URL、session_id、node_id 上传到 https://api.ainclaw.com,虽有PII清理但仍有信息泄露风险

undici 依赖无版本锁定 +5

package.json 中 undici 版本为 ^7.2.0,major版本浮动存在供应链风险

Most important evidence

High Doc Mismatch

SKILL.md 声称「本地存储不传敏感数据」但默认自动云端上传

SKILL.md 营销文案明确声明「隐私安全:工作流保存在本地,不上传敏感数据」,但 skill.json 中 auto_contribute 默认为 true,onSessionComplete 会将完整 session action trace、intent、URL、node_id POST 到 https://api.ainclaw.com/v1/lobsters/contribute。PII虽经sanitizer清理但URL、行为序列等元数据仍外传。

SKILL.md:73
将 auto_contribute 默认值改为 false;在 SKILL.md 中明确告知用户云端数据流,包含具体上传字段列表;提供明确的用户知情同意机制。
High Priv Escalation

文件系统 WRITE 权限未在 permissions 中声明

local-store.ts 对 ~/.openclaw/workflows/ 执行完整的文件系统操作(fs.writeFileSync、fs.readFileSync、fs.mkdirSync、fs.unlinkSync),但 skill.json 的 permissions 数组中无 filesystem 声明,SKILL.md 中也无文件系统相关描述。

src/local-store.ts:61
在 skill.json permissions 中添加 filesystem 声明,并说明存储目录和用途。
Medium Data Exfil

session action trace 数据自动发送至外部端点

每次 session 成功后,onSessionComplete 将包含完整 action traces、intent、URL、dom_skeleton_hash、node_id、session_id 的数据 POST 到 api.ainclaw.com。虽然 PII 经 sanitizer 清理,但浏览器历史行为模式、URL 访问模式、node_id 等均为敏感元数据,且用户无明确感知。

src/cloud-client.ts:47
明确告知用户数据外传范围;在 SKILL.md 配置章节详细列出上传字段;提供 opt-in 机制而非默认开启。
Medium Doc Mismatch

SKILL.md 功能描述模糊,未披露核心数据处理逻辑

SKILL.md 使用大量营销语言(省钱、快速、智能)而非技术描述,缺少对关键机制的技术说明:1) 拦截 intent 的实际行为;2) 本地缓存命中后的执行逻辑;3) 云端贡献的完整数据流。用户无法基于真实信息做安全决策。

SKILL.md:1
重写 SKILL.md,移除营销语言,补充技术架构说明:数据流图、权限需求、存储位置、上传字段清单。
Low Supply Chain

undici 依赖使用 ^ 浮动版本

package.json 中 undici 版本为 ^7.2.0,major 版本浮动可能在后续引入不兼容变更或已知漏洞。

package.json:10
锁定为精确版本(如 7.2.0)或使用 ~7.2.0 允许 patch 更新。

Declared capability vs actual capability

Network Pass
Declared READ
Inferred WRITE
skill.json:9 cloud POST/GET 请求为合法功能,但 endpoint 未在 SKILL.md 中声明
Filesystem Block
Declared NONE
Inferred WRITE
src/local-store.ts:60-65 fs.writeFileSync 写入 ~/.openclaw/workflows/ 目录,permissions 中无 filesystem 声明
Browser Pass
Declared READ/WRITE
Inferred READ/WRITE
skill.json:9 声明 browser,代码中合法使用 getCurrentUrl/getDomSkeletonHash/execute
lobster Pass
Declared READ/WRITE
Inferred READ/WRITE
skill.json:9 声明 lobster,代码中合法使用 validate/execute
sessions_history Pass
Declared READ
Inferred READ
skill.json:9 声明 sessions_history,代码中仅读取 sessionHistory

Suspicious artifacts and egress

Medium External URL
https://api.ainclaw.com

SKILL.md:97

Medium External URL
https://clawhub.dev/skills/token-sop

skill.json:7

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
undici ^7.2.0 npm No 无版本锁定,major 浮动
typescript ^5.7.0 npm-dev No 仅开发依赖
@types/node ^22.0.0 npm-dev No 仅开发依赖

File composition

32 files · 2558 lines
TypeScript 17 files · 1405 linesJavaScript 9 files · 883 linesJSON 4 files · 143 linesMarkdown 2 files · 127 lines
Files of concern · 1
src/local-store.ts TypeScript · 229 lines
文件系统 WRITE 权限未在 permissions 中声明
Other files · interceptor.js · interceptor.ts · local-store.js · sanitizer.js · sanitizer.ts · trace-compiler.js +5

Security positives

PII sanitizer 实现完善,对 email、phone、card、ssn、password、api_key 等敏感信息有系统化正则清理
Lobster 工作流执行前有 validate 校验,防止恶意 workflow 注入
云端贡献默认有过滤逻辑(至少2步、status=success),避免无价值数据污染
代码结构清晰,模块化良好,无明显恶意代码模式(无 base64 执行、无 eval、无隐蔽网络通道)
云端请求为标准 HTTPS,非硬编码 IP,数据流向可追溯
onSessionComplete 的 cloud contribute 有 try-catch,失败时静默降级不影响主流程