news-briefing
gen-cover.mjs 中存在未声明的 shell 执行和动态代码注入行为(execSync + 字符串模板生成代码),但受控于合法用途(生成封面图片),无恶意指标,判定为可疑阴影功能。
为什么得出这个结论
1/4 个维度触发发现 2 项声明之外的能力或越权行为。
提取到 7 个一般风险产物,需要结合上下文判断。
没有形成明确的恶意路径。
依赖结构存在,但暂未看到明显高危告警。
风险分是怎么被拉高的
gen-cover.mjs 未声明 shell 执行能力,代码中将模板字符串拼接成 JS 代码并通过 node -e 执行,违反声明-行为一致性原则
@napi-rs/canvas 未声明在 requirements 中,且硬编码 node_modules 路径存在供应链脆弱性
fetch-news.mjs 用 execSync 执行 curl 超时 30s,属 shell:WRITE 行为但 SKILL.md 仅声明 network:READ
最关键的证据
未声明的 shell 执行和动态代码注入
gen-cover.mjs 声明为封面图生成工具(输出 cover.png),但实际通过 execSync('node -e "..."') 注入包含完整 canvas 绘图逻辑的模板字符串,并写入 /tmp/gen-cover.js 后执行。SKILL.md 完全未提及 shell 执行、execSync 或动态代码生成,属于明确越权的阴影功能。
scripts/gen-cover.mjs:56 @napi-rs/canvas 硬编码 node_modules 路径无版本锁定
gen-cover.mjs 第 68 行硬编码了 @napi-rs/canvas 的 node_modules 嵌套路径(含 pnpm 哈希命名),这种路径极易在依赖更新后失效,且无 package.json 记录版本。
scripts/gen-cover.mjs:68 execSync curl 未在文档中声明为 shell:WRITE
fetch-news.mjs 用 execSync 调用 curl 发送 HTTP 请求,属于 shell:WRITE 行为(对应 allowed-tools 的 Bash 工具),但 SKILL.md 仅声明了 network:READ 能力,未涉及 shell。虽为合法用途(调用外部 API),但超出了声明范围。
scripts/fetch-news.mjs:73 声明能力 vs 实际能力
gen-cover.mjs:56 writeFileSync + execSync 写入 /tmp/gen-cover.js 并执行 gen-cover.mjs:83 execSync(node -e ...) 执行动态字符串代码;fetch-news.mjs:73 execSync(curl ...) fetch-news.mjs 访问 api.perplexity.ai、api.ppinfra.com;send-card.mjs 访问 open.feishu.cn(均为合法业务API) send-card.mjs:84 仅将 Google 搜索 URL 作为 fallback,不实际打开 可疑产物与外联
https://openclaw.ai SKILL.md:138
https://clawhub.com/u/derekhsu529 SKILL.md:138
https://api.perplexity.ai/chat/completions scripts/fetch-news.mjs:65
https://api.ppinfra.com/v3/openai/chat/completions scripts/fetch-news.mjs:122
https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal scripts/send-card.mjs:35
https://www.google.com/search?q=$ scripts/send-card.mjs:84
https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id scripts/send-card.mjs:140
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| @napi-rs/canvas | 0.1.95 (硬编码路径) | pnpm | 否 | 无 package.json 锁定版本,硬编码 node_modules 嵌套路径 |
文件构成
scripts/fetch-news.mjs scripts/gen-cover.mjs scripts/send-card.mjs SKILL.md