news-briefing
gen-cover.mjs 中存在未声明的 shell 执行和动态代码注入行为(execSync + 字符串模板生成代码),但受控于合法用途(生成封面图片),无恶意指标,判定为可疑阴影功能。
Why this conclusion was reached
1/4 dimensions flagged2 undeclared or violating capabilities were inferred.
7 lower-risk artifacts were extracted and still need context.
There is no explicit malicious chain in the report.
Dependencies are present but no obvious high-risk issue stands out.
What drove the risk score up
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
Most important evidence
未声明的 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 Declared capability vs actual capability
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,不实际打开 Suspicious artifacts and egress
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
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| @napi-rs/canvas | 0.1.95 (硬编码路径) | pnpm | No | 无 package.json 锁定版本,硬编码 node_modules 嵌套路径 |
File composition
scripts/fetch-news.mjs scripts/gen-cover.mjs scripts/send-card.mjs SKILL.md