可疑 — 风险评分 40/100
上次扫描:4 小时前 重新扫描
40 /100
wip-readme-format
Reformat any repo's README to follow the WIP Computer standard. Agent-first, human-readable.
README格式化工具存在文档-行为差异:声明filesystem权限为NONE但实际执行WRITE操作,同时动态导入child_process模块执行git命令检查文件状态。
技能名称wip-readme-format
分析耗时45.9s
引擎pi
ClawHub Wip Readme Format v1.9.68 by parkertoddbrooks
📥 605
ClawHub 判定 可疑 dangerous_exec
谨慎使用
补充声明filesystem:WRITE和可能的shell:READ权限;考虑使用显式导入替代动态导入child_process;添加依赖模块wip-universal-installer的来源验证。

安全发现 4 项

严重性 安全发现 位置
中危
未声明的文件系统写入权限 权限提升
SKILL.md声明filesystem为NONE,但format.mjs执行writeFileSync写入README-init-*.md、README.md和TECHNICAL.md,另有mkdirSync创建ai/_trash目录、unlinkSync删除临时文件。
writeFileSync(initPath(repoPath, section), sections[section] + '\n');
→ 在SKILL.md的capabilities或allowed-tools中声明Write权限,说明工具会生成和修改README文件
format.mjs:310
中危
动态导入child_process模块 代码混淆
format.mjs第322行使用await import('node:child_process')动态导入模块,在DEPLOY模式下执行git status命令检查文件状态。动态导入可能意图规避静态分析。
const { execSync } = await import('node:child_process');
→ 使用静态import声明或将git检查逻辑改为Node.js原生API实现
format.mjs:322
低危
外部依赖模块来源未声明 供应链
format.mjs从../wip-universal-installer/detect.mjs导入detectInterfaces和detectToolbox函数。该模块的功能和安全性未在SKILL.md中说明。
import { detectInterfaces, detectToolbox } from '../wip-universal-installer/detect.mjs';
→ 在SKILL.md的requires.dependencies中声明此依赖,或说明其用途和来源可信性
format.mjs:27
低危
shields.io外部URL引用 文档欺骗
代码生成shields.io badge URLs用于README,包含外部链接。预扫描标记为medium risk。
const badge = `https://img.shields.io/badge/interface-${label}-black`;
→ 确认这些URL仅用于生成静态链接,非主动请求。当前实现仅生成URL无HTTP请求,风险可接受
format.mjs:82
资源类型声明权限推断权限状态证据
文件系统 NONE WRITE ✗ 越权 format.mjs:310 writeFileSync写入README-init-*.md, format.mjs:370 writeFileSync写入RE…
命令执行 NONE READ ✗ 越权 format.mjs:322 await import('node:child_process'), format.mjs:334 execSync('git …
网络访问 NONE READ ✓ 一致 仅生成shields.io badge URLs,无实际HTTP请求
技能调用 NONE NONE 导入外部模块detectInterfaces但仅用于检测接口类型
2 项发现
🔗
中危 外部 URL 外部 URL
https://img.shields.io/badge/interface-$
format.mjs:82
🔗
中危 外部 URL 外部 URL
https://img.shields.io/badge/Universal_Interface_Spec-black?style=flat&color=black
format.mjs:506

目录结构

4 文件 · 24.4 KB · 745 行
JavaScript 1f · 597L Markdown 2f · 133L JSON 1f · 15L
├─ 📜 format.mjs JavaScript 597L · 20.6 KB
├─ 📋 package.json JSON 15L · 461 B
├─ 📝 README.md Markdown 49L · 1.5 KB
└─ 📝 SKILL.md Markdown 84L · 1.9 KB

依赖分析 4 项

包名版本来源已知漏洞备注
wip-universal-installer/detect.mjs unknown local sibling module 内部依赖,来源为同仓库tools目录
node:fs bundled node built-in Node.js标准库,用于文件读写
node:path bundled node built-in Node.js标准库,用于路径处理
node:child_process bundled node built-in 动态导入,用于git status命令执行

安全亮点

✓ 代码结构清晰,主要功能为纯文本处理和文件生成
✓ 包含dry-run和--check模式,允许预览和验证而不实际写入
✓ DEPLOY模式有安全检查:阻止未审查的init文件直接部署
✓ 自动备份旧文件到ai/_trash/目录,防止数据丢失
✓ 无凭证读取、无数据外传、无网络主动请求
✓ 依赖简单(Node.js标准库为主),攻击面较小