Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

jest-unittest

v1.0.3

单元测试 Skills 集合。当用户提到单测、单元测试、覆盖率、单测覆盖、单测失败、单测报错、修复单测、补充测试、覆盖率不足、覆盖率100%、运行单测、组件测试等关键词时触发。 包含三个子技能:unittest-checker(覆盖率检测)、unittest-completer(自动补全测试至100%)、unit...

1· 96·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
技能名与描述(覆盖率检测、自动补全测试、诊断修复)与包含的脚本/子技能功能对齐;所需权限(读写测试文件、运行 jest/npx)与功能预期相符。唯一偏差是脚本把 per-project 配置(source.json/config.json)放在 skill 包目录下的 .temp 中,而不是直接放在项目目录,这可能令用户意外地将项目相关配置保存在 skill 安装目录。
!
Instruction Scope
运行时的脚本会:读取项目 jest 配置和源码、运行 npx jest(通过 execSync / shell)、解析 coverage 与错误、并在 completer 中使用 Edit/Write/ MultiEdit 修改测试文件(在明确告知下才会修改源文件)。风险点:命令字符串以简单拼接方式构建并传入 shell(例如 testCommand 包含来自 source.jestConfigPath 与其他配置字段),如果这些字段被恶意或意外设置,可能出现命令注入;脚本也会读取/写入项目文件,带来潜在的破坏性改动(虽然文档声明优先修改测试文件)。总体上操作超出“只读分析”的范围,但与“自动补全/修复单测”的目的有关联。
Install Mechanism
该 skill 是 instruction-only(无安装规范),包含本地脚本文件。没有从远程 URL 下载或在安装时执行未知二进制文件,风险相对较低。
Credentials
技能不请求任何环境变量或外部凭证——这与其本地运行测试/修改文件的目的相称。需要注意的是,它会调用 `npx`/`git`,这些工具可能会访问网络或本地工具链,且运行 `npx` 会在需要时从 npm 拉取包,这是预期行为但有网络依赖。
!
Persistence & Privilege
技能不会设置 always:true,也不请求持久凭证,但会在 skill 包目录生成 `.temp/projects/<hash>/` 和 coverage 报告文件,且允许通过 agent 的 Edit/Write 权限自动修改测试文件(并在特定情况下修改源文件)。自动修改代码是该技能的核心功能,但对不熟悉行为的用户具有潜在破坏性,应该在受控分支或备份下运行。
What to consider before installing
这个技能看起来确实会运行 Jest、生成/解析 coverage,并自动写入测试文件以尝试把覆盖率补到 100%,功能与描述一致。但有几点在使用前务必注意: 1) 在启用前备份或在单独分支/沙箱仓库运行:completer 会编辑测试文件(并可能在极少数情况下修改源文件),以免意外破坏主分支代码。 2) 检查并确认 source.json(jestConfigPath)的内容:脚本把该路径直接拼到 shell 命令里,错误或恶意的路径字符串可能导致命令注入风险。不要把不可信的字符串写入 source.json。最好由你手动填写或审查该文件后再运行 reload。 3) 审阅生成的 config.json 与 .temp 内容:技能将 per-project 配置和覆盖率产物放在 skill 的 .temp 下(skill 包目录),这可能与你预期的项目结构不同,确认路径不会暴露敏感信息或被误提交。 4) 网络/依赖行为:脚本使用 npx 和可能触发 npm 下载,确保在可控网络环境下运行,或事先在项目中安装好依赖(本地 jest),以减少远程包拉取。 5) 命令注入风险:如果你担心安全,审查脚本(已经包含在包内)并/或将命令执行改为使用参数化 APIs(或手动运行生成的命令)来避免 shell 拼接风险。 如果你愿意,我可以帮你审阅具体的 source.json/config.json 示例、或者把这些脚本逐条解释清楚并指出如何在你的环境中安全运行。
scripts/guard-config.cjs:63
Shell command execution detected (child_process).
scripts/reload.cjs:169
Shell command execution detected (child_process).
scripts/resolve-project.cjs:30
Shell command execution detected (child_process).
sub-skills/unittest-checker/scripts/analyze-coverage/index.cjs:63
Shell command execution detected (child_process).
sub-skills/unittest-completer/scripts/check-coverage-100/index.cjs:47
Shell command execution detected (child_process).
sub-skills/unittest-doctor/scripts/test-error-reporter/index.cjs:39
Shell command execution detected (child_process).
Patterns worth reviewing
These patterns may indicate risky behavior. Check the VirusTotal and OpenClaw results above for context-aware analysis before installing.

Like a lobster shell, security has layers — review code before you run it.

latestvk97dpzs491mdqfmzx8228mayq5844pkd

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Comments