Skill Trust Decision

feishu-log

飞书日志技能存在硬编码凭证和交互式凭证收割风险,凭证作为默认值传播在多个文件中,构成中等安全风险

Install decision first Source: ClawHub Scanned: 4 hr ago
Files 15
Artifacts 18
Violations 0
Findings 4
Most direct threat evidence
Critical Credential Theft
硬编码飞书应用凭证

4个文件(log-interactive.mjs, log-simple.mjs, log-work.mjs, log.js)硬编码相同的飞书 APP_ID 和 APP_SECRET 作为默认值。当环境变量未设置时,代码会使用这些硬编码凭证,导致凭证在代码仓库中公开传播。

log-interactive.mjs:4

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

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

Block
Attack chain and severe findings

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

Review
Dependencies and supply chain hygiene

1 dependency or supply-chain issues need attention.

Attack Chain

01
用户下载并使用 feishu-log 技能

Entry · SKILL.md:1

02
技能使用硬编码凭证或 config-credentials.js 收割用户凭证

Escalation · config-credentials.js:58

03
凭证被持久化到 ~/.openclaw/feishu-credentials.json 或通过硬编码方式泄露

Impact · config-credentials.js:73

What drove the risk score up

硬编码凭证传播 +30

4个文件硬编码飞书 APP_SECRET 作为默认值,凭证已泄露

交互式凭证收割工具 +20

config-credentials.js 可收集用户凭证并保存到文件

凭证优先级设计缺陷 +10

代码使用 fallback 机制,环境变量未设置时使用硬编码凭证

文档与实现不一致 +10

SKILL.md 声称从 .env 加载,但代码有硬编码默认值

敏感文件包含凭证 +5

config-credentials.js 被预扫描标记为敏感文件

Most important evidence

Critical Credential Theft

硬编码飞书应用凭证

4个文件(log-interactive.mjs, log-simple.mjs, log-work.mjs, log.js)硬编码相同的飞书 APP_ID 和 APP_SECRET 作为默认值。当环境变量未设置时,代码会使用这些硬编码凭证,导致凭证在代码仓库中公开传播。

log-interactive.mjs:4
删除所有硬编码凭证,强制要求用户通过环境变量或 .env 文件配置凭证
High Credential Theft

交互式凭证收割工具

config-credentials.js 提供交互式输入功能,会收集用户输入的 APP_SECRET 并保存到 ~/.openclaw/feishu-credentials.json。虽有默认值填充逻辑,但用户若直接回车确认,凭证会以明文保存。

config-credentials.js:58
删除此文件或移除默认值,强制要求用户提供有效凭证
Medium Doc Mismatch

文档声明与实现不符

SKILL.md 声称'从 .env 文件加载配置',但代码实现中包含硬编码默认值作为 fallback,与文档描述的'必填'配置要求不符。

feishu-log.js:27
移除代码中的默认值 fallback,严格验证配置存在性
Medium Supply Chain

第三方依赖无版本锁定

log-interactive.mjs, log-work.mjs, log.js 使用 @larksuiteoapi/node-sdk 但未锁定版本,存在供应链攻击风险。

log-interactive.mjs:1
在 package.json 中锁定依赖版本

Declared capability vs actual capability

Filesystem Pass
Declared READ
Inferred READ
feishu-log.js:35-67 从 .env 读取配置
Network Pass
Declared WRITE
Inferred WRITE
所有文件都调用飞书 API 写入文档
Shell Pass
Declared NONE
Inferred NONE
无 shell 执行代码

Suspicious artifacts and egress

Medium External URL
https://feishu.cn/drive

README-权限设置.md:14

Medium External URL
https://feishu.cn/drive/folder/[文件夹

README-权限设置.md:37

Medium External URL
https://feishu.cn/drive/folder/MDjAfBJorlqu14dWxBocy7MnnId

README-权限设置.md:41

Medium External URL
https://open.feishu.cn/document

README-权限设置.md:79

Medium External URL
https://open.feishu.cn/app/YOUR_APP_ID/auth?q=drive:drive

README.md:141

Medium External URL
https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal/

README.md:193

Medium External URL
https://open.feishu.cn/open-apis/contact/v3/users?user_id_type=open_id&page_size=10

README.md:197

Medium External URL
https://feishu.cn/docx/doxxx

README.md:228

Medium External URL
https://open.feishu.cn/open-apis/drive/v1/permissions/:token/members

README.md:343

Medium External URL
https://open.feishu.cn/

config-credentials.js:51

Medium External URL
https://open.feishu.cn/open-apis

feishu-log.js:25

Medium External URL
https://feishu.cn/docx/$

feishu-log.js:305

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
@larksuiteoapi/node-sdk * npm No 无版本锁定

File composition

15 files · 3452 lines
JavaScript 6 files · 1752 linesMarkdown 7 files · 1657 linesShell 1 files · 25 linesJSON 1 files · 18 lines
Files of concern · 7
config-credentials.js JavaScript · 93 lines
交互式凭证收割工具 · https://open.feishu.cn/
feishu-log.js JavaScript · 737 lines
文档声明与实现不符 · https://open.feishu.cn/open-apis · https://feishu.cn/docx/$
README.md Markdown · 451 lines
https://open.feishu.cn/app/YOUR_APP_ID/auth?q=drive:drive · https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal/ · https://open.feishu.cn/open-apis/contact/v3/users?user_id_type=open_id&page_size=10 · https://feishu.cn/docx/doxxx · https://open.feishu.cn/open-apis/drive/v1/permissions/:token/members
log-interactive.mjs JavaScript · 208 lines
硬编码飞书应用凭证 · 第三方依赖无版本锁定 · https://wcnh9mbykuay.feishu.cn/docx/$
log-simple.mjs JavaScript · 223 lines
https://bytedance.feishu.cn/docx/$
更新说明.md Markdown · 139 lines
https://open.feishu.cn/document/ukTMukTMukTM/uEjNwUjLxYDM14SM2gTN · https://open.feishu.cn/document/ukTMukTMukTM/ucDM54SOy4DNL4SM2gTN · https://open.feishu.cn/document/ukTMukTMukTM/uYjNwUjL2YDM14iN2gTN
修复报告.md Markdown · 102 lines
https://wcnh9mbykuay.feishu.cn/docx/Z463dNM4EoBOvOxNGIhcQEdbn0d
Other files · SKILL.md · log-work.mjs · log.js · 技能规范检查.md · 规范符合性总结.md

Security positives

使用 HTTPS 进行所有 API 通信
无 shell 命令执行
无环境变量遍历收割敏感信息
无 base64 编码或代码混淆
飞书 API 调用符合官方文档