安全决策报告

kuaidi-query

合法快递查询工具,config.json 中含硬编码 API 密钥属凭证安全缺陷,但未见数据外泄或恶意行为。

安装决策优先 来源: ClawHub 扫描时间: 2026/4/8
文件 9
IOC 28
越权项 0
发现 3

为什么得出这个结论

1/4 个维度触发
通过
声明与实际能力

声明资源与推断能力基本一致。

复核
隐藏执行与外联

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

阻止
攻击链与高危发现

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

复核
依赖与供应链卫生

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

风险分是怎么被拉高的

config.json 含硬编码 API 密钥 +20

Track123 API 密钥明文存储在配置文件中,若该文件被上传至公开仓库将导致凭证泄露

权限声明与实际能力存在偏差 +5

SKILL.md 未明确声明 filesystem:WRITE(写缓存)和 network:WRITE(向 Track123 API 发请求)

最关键的证据

高危 凭证窃取

config.json 包含硬编码 API 密钥

config.json 中明文存储了 Track123 API 的 app_key 和 api_secret (值均为 120cb954891a4d9aa1418c7012225afb)。该文件通常不应提交到版本库,若被公开将导致凭证泄露。建议使用环境变量或 .env 文件替代。

config.json:2
将 config.json 加入 .gitignore,通过环境变量 TRACK123_API_SECRET 注入凭证,或使用 dotenv 库加载 .env 文件
低危 文档欺骗

SKILL.md 未声明实际需要的权限

SKILL.md 未提及需要 filesystem:WRITE 权限(写缓存)和 network:WRITE 权限(向 Track123 API 发请求)。虽然这些操作是功能必需的,但声明缺失会导致权限审核不准确。

SKILL.md:1
在 SKILL.md 末尾添加 allowed-tools 声明:Read (filesystem:READ), Write (filesystem:WRITE), WebFetch (network:WRITE)
低危 供应链

axios 依赖无版本锁定

package.json 中 axios 版本为 ^1.13.6,使用 caret 范围而非固定版本,可能引入供应链风险。

package.json:11
使用精确版本 "axios": "1.13.6" 或锁定 lockfile 版本

声明能力 vs 实际能力

文件系统 通过
声明 NONE
→
推断 WRITE
scripts/query.js:24 写 .cache.json,:23 读 config.json
网络访问 通过
声明 NONE
→
推断 WRITE
scripts/query.js:108,139,162 通过 axios 发送 POST 请求到 api.track123.com

可疑产物与外联

中危 外部 URL
https://www.track123.com/

SKILL.md:155

中危 外部 URL
https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz

package-lock.json:17

中危 外部 URL
https://registry.npmmirror.com/axios/-/axios-1.13.6.tgz

package-lock.json:23

中危 外部 URL
https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz

package-lock.json:34

中危 外部 URL
https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz

package-lock.json:47

中危 外部 URL
https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz

package-lock.json:59

中危 外部 URL
https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz

package-lock.json:68

中危 外部 URL
https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz

package-lock.json:82

中危 外部 URL
https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz

package-lock.json:91

中危 外部 URL
https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz

package-lock.json:100

中危 外部 URL
https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz

package-lock.json:112

中危 外部 URL
https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.11.tgz

package-lock.json:127

依赖与供应链

包名版本来源漏洞备注
axios ^1.13.6 npm 否 使用 caret ^ 范围,未锁定精确版本

文件构成

9 个文件 · 1670 行
Markdown 3 个文件 · 820 行JavaScript 1 个文件 · 525 行JSON 5 个文件 · 325 行
需关注文件 · 6
config.json JSON · 8 行
config.json 包含硬编码 API 密钥
scripts/query.js JavaScript · 525 行
https://api.track123.com/gateway/open-api/tk/v2
package-lock.json JSON · 295 行
https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz · https://registry.npmmirror.com/axios/-/axios-1.13.6.tgz · https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz · https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz · https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz · https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz · https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz · https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz · https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz · https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz · https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.11.tgz · https://registry.npmmirror.com/form-data/-/form-data-4.0.5.tgz · https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz · https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz · https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz · https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz · https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz · https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz · https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz · https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz · https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz · https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz · https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz
references/track123-api.md Markdown · 260 行
https://api.track123.com/gateway/open-api/tk/v2.1 · https://api.track123.com/gateway/open-api/tk/v2.1/track/query-realtime · https://docs.track123.com/
SKILL.md Markdown · 223 行
SKILL.md 未声明实际需要的权限 · https://www.track123.com/
package.json JSON · 10 行
axios 依赖无版本锁定
其他文件 · examples.md · _meta.json · config.example.json

安全亮点

代码结构清晰,无混淆或 Base64 编码执行
无敏感路径遍历(如 ~/.ssh、~/.aws、.env 等)
无环境变量中敏感关键字的遍历收割行为
无远程脚本下载执行(curl|bash 管道)
API 调用仅限于声明的 Track123 服务,无外部 IP 连接
代码逻辑与文档描述功能一致,无阴影功能