Skill Trust Decision

baidu-netdisk-skill

硬编码加密密钥导致声称的 AES-256 加密形同虚设,文档-行为存在欺骗,依赖无版本锁定存在供应链风险,但无主动恶意行为证据。

Install decision first Source: ClawHub Scanned: Apr 6, 2026
Files 13
Artifacts 27
Violations 0
Findings 6
Most direct threat evidence
High Doc Mismatch
硬编码加密密钥使 AES-256 加密承诺失效

auth.js:18 和 baidu-api.js:20 使用固定字符串 'baidu-netdisk-skill-secret-2026' 经 SHA-256 派生 ENCRYPTION_KEY,该密钥随源码公开。所有用户 Token 使用相同密钥加密,攻击者获取源码后可直接解密全部已存储 Token。SKILL.md 和 SECURITY.md 均未披露此设计,声称'Token 本地加密存储(AES-256)'但加密密钥已知使该保护名存实亡。

src/auth.js:18

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

27 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

6 dependency or supply-chain issues need attention.

What drove the risk score up

硬编码加密密钥 +25

auth.js:18 和 baidu-api.js:20 使用固定字符串派生 ENCRYPTION_KEY,任何人可见源码即可解密所有用户 Token,使'AES-256加密存储'承诺形同虚设

文档-行为欺骗 +15

SKILL.md 声称'Token 本地加密存储'但未披露使用固定密钥;SECURITY.md 声称'无隐藏后门'但硬编码密钥本质上等同于已知后门

未声明的 filesystem 访问 +5

skill.json 未声明 filesystem 权限,代码通过 conf 库访问 ~/.config/configstore/ 路径

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

代码读取 process.env.BAIDU_API_KEY, process.env.BAIDU_SECRET_KEY, process.env.ENCRYPTION_KEY,但 skill.json tools 列表和 SKILL.md 均未声明

依赖无版本锁定 +5

axios ^1.6.0, crypto-js ^4.2.0 等依赖使用 semver caret 范围,未锁定具体版本,存在供应链攻击风险

skill.json tools 字段不准确 +2

skill.json 声明 tools: ['exec'] 但代码中无任何 exec/spawn 调用,实际使用 filesystem 操作

Most important evidence

High Doc Mismatch

硬编码加密密钥使 AES-256 加密承诺失效

auth.js:18 和 baidu-api.js:20 使用固定字符串 'baidu-netdisk-skill-secret-2026' 经 SHA-256 派生 ENCRYPTION_KEY,该密钥随源码公开。所有用户 Token 使用相同密钥加密,攻击者获取源码后可直接解密全部已存储 Token。SKILL.md 和 SECURITY.md 均未披露此设计,声称'Token 本地加密存储(AES-256)'但加密密钥已知使该保护名存实亡。

src/auth.js:18
将 ENCRYPTION_KEY 改为必须由用户提供或从系统密钥管理服务获取,绝不能使用内置默认值。
High Credential Theft

内置加密密钥使已加密 Token 可被批量解密

由于 ENCRYPTION_KEY 硬编码且公开,用户存储的 accessToken 和 refreshToken 虽经 AES 加密但密钥已知。攻击者只需读取配置文件并用同一密钥解密即可获得明文 Token,影响所有用户。

src/baidu-api.js:20
使用用户提供的主密码派生密钥(PBKDF2),或集成系统密钥链(如 keytar),禁止内置默认密钥。
Medium Supply Chain

npm 依赖无版本锁定

package.json 中 axios ^1.6.0, crypto-js ^4.2.0, commander ^11.1.0, conf ^10.2.0 等依赖使用 caret 范围,未锁定具体版本。npm install 时可能安装带有安全漏洞的更新版本。

package.json:38
使用 npm ci 或将 package.json 改为精确版本(~ 或无修饰符),并定期运行 npm audit 扫描已知漏洞。
Medium Doc Mismatch

skill.json 声明 tools: ['exec'] 但代码无任何 exec 调用

skill.json 的 tools 字段声明使用 'exec' 工具,但实际代码中无 child_process.exec/spawn/fork 等任何 shell 执行调用。声明的工具与实际代码能力不匹配,可能误导 AI Agent 授予不必要的 shell 执行权限。

skill.json:18
将 tools 字段改为描述实际使用的资源类型,如 ['filesystem:READ', 'network:READ'] 或移除 tools 字段。
Medium Priv Escalation

未声明的敏感文件路径访问

代码通过 conf 库访问 ~/.config/configstore/baidu-netdisk-skill.json 存储配置和加密 Token,但 skill.json 和 SKILL.md 均未声明 filesystem 权限及此具体路径。用户在授权时无法了解该路径将被访问。

src/auth.js:35
在 skill.json security.fileAccess 字段中明确列出 ~/.config/configstore/ 路径,并在 SKILL.md 安全说明中告知用户。
Low Doc Mismatch

README.md 包含付费订阅推广内容

README.md 末尾包含'首发优惠'、'前100名用户5折'、'年付用户¥999/年'等付费推广内容,与工具类开源项目性质不符,可能是诱导付费的营销手段。

README.md:337
如为开源工具,移除付费推广内容;如为付费产品,在 SKILL.md 中明确标注。

Declared capability vs actual capability

Filesystem Pass
Declared NONE
Inferred READ
src/auth.js:35 使用 Conf 库读取 ~/.config/configstore/baidu-netdisk-skill.json; src/baidu-api.js:296 使用 fs.readFileSync 读取本地文件上传
Network Pass
Declared READ
Inferred READ
仅调用 pan.baidu.com 和 openapi.baidu.com,与 skill.json 声明的 externalDomains 一致
Environment Pass
Declared NONE
Inferred READ
src/auth.js:17-18, src/baidu-api.js:20-21 读取 ENCRYPTION_KEY/BAIDU_API_KEY/BAIDU_SECRET_KEY 环境变量,SKILL.md 未提及
Shell Pass
Declared NONE
Inferred NONE
skill.json 声明 tools: ['exec'] 但代码中无任何 child_process.exec/spawn/popen 调用

Suspicious artifacts and egress

Medium External URL
https://img.shields.io/badge/License-MIT-yellow.svg

README.md:5

Medium External URL
https://opensource.org/licenses/MIT

README.md:5

Medium External URL
https://img.shields.io/badge/Node.js-%3E%3D18.0.0-green.svg

README.md:6

Medium External URL
https://nodejs.org/

README.md:6

Medium External URL
https://img.shields.io/badge/ClawHub-Skill-blue.svg

README.md:7

Medium External URL
https://clawhub.ai/

README.md:7

Medium External URL
https://img.shields.io/badge/Security-Self--Audited-brightgreen.svg

README.md:8

Medium External URL
https://img.shields.io/badge/Privacy-No%20Data%20Collection-success.svg

README.md:9

Medium External URL
https://pan.baidu.com/union/console

README.md:150

Medium External URL
https://clawhub.ai/niukesi/baidu-netdisk-skill

TODO.md:60

Medium External URL
https://pan.baidu.com/union/apply

docs/QUICKSTART.md:7

Medium External URL
https://openapi.baidu.com/oauth/2.0/authorize?

docs/QUICKSTART.md:30

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
axios ^1.6.0 npm No semver caret 范围,未锁定版本;需关注已知漏洞报告
crypto-js ^4.2.0 npm No semver caret 范围,未锁定版本;本项目用于 AES 加密
commander ^11.1.0 npm No semver caret 范围,未锁定版本
conf ^10.2.0 npm No semver caret 范围,未锁定版本;存储配置到 ~/.config
ora ^5.4.1 npm No semver caret 范围,未锁定版本
chalk ^4.1.2 npm No semver caret 范围,未锁定版本

File composition

13 files · 3972 lines
JSON 4 files · 2271 linesMarkdown 5 files · 907 linesJavaScript 3 files · 686 linesShell 1 files · 108 lines
Files of concern · 9
package-lock.json JSON · 2101 lines
https://opencollective.com/eslint · https://www.patreon.com/feross · https://feross.org/support · https://eslint.org/version-support · https://opencollective.com/fastify · [email protected]
README.md Markdown · 361 lines
README.md 包含付费订阅推广内容 · https://img.shields.io/badge/License-MIT-yellow.svg · https://opensource.org/licenses/MIT · https://img.shields.io/badge/Node.js-%3E%3D18.0.0-green.svg · https://nodejs.org/ · https://img.shields.io/badge/ClawHub-Skill-blue.svg · https://clawhub.ai/ · https://img.shields.io/badge/Security-Self--Audited-brightgreen.svg · https://img.shields.io/badge/Privacy-No%20Data%20Collection-success.svg · https://pan.baidu.com/union/console · [email protected]
src/baidu-api.js JavaScript · 324 lines
内置加密密钥使已加密 Token 可被批量解密 · https://pan.baidu.com/rest/2.0/xpan · https://pan.baidu.com/union/doc/pksg0s9ns · https://pan.baidu.com/rest/2.0/xpan/nas · https://pan.baidu.com/rest/2.0/xpan/file
src/auth.js JavaScript · 123 lines
硬编码加密密钥使 AES-256 加密承诺失效 · 未声明的敏感文件路径访问 · https://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id=$ · https://openapi.baidu.com/oauth/2.0/token
SECURITY.md Markdown · 197 lines
skill.json JSON · 104 lines
skill.json 声明 tools: ['exec'] 但代码无任何 exec 调用
docs/QUICKSTART.md Markdown · 147 lines
https://pan.baidu.com/union/apply · https://openapi.baidu.com/oauth/2.0/authorize? · https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code=你的
TODO.md Markdown · 76 lines
https://clawhub.ai/niukesi/baidu-netdisk-skill
package.json JSON · 61 lines
npm 依赖无版本锁定
Other files · index.js · SKILL.md · test-local.sh

Security positives

代码结构清晰,核心功能(文件列表/搜索/上传/下载)与文档描述一致
仅调用百度官方 API(pan.baidu.com, openapi.baidu.com),无第三方追踪
无主动的恶意行为证据(无反向 shell、无 base64 编码执行、无凭证外传)
OAuth 2.0 授权流程设计合理,不存储用户明文密码
Token 刷新机制实现正确,refreshAccessToken 方法有效
test-local.sh 提供本地测试支持,辅助安全验证