Back to skill

Security audit

hekouwang-env-doctor-skill

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed developer disk-audit and cleanup skill with guarded local cleanup controls, but users should review each deletion choice carefully.

Install only if you want a developer-environment disk scanner and are comfortable sharing local path/size metadata with your agent. Use the read-only scan first, then run the cleaner in --dry-run mode and select only entries you personally recognize as disposable; do not treat the fixed residue labels as proof that an active version manager is unused.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:103
Finding

Branded Cross-Promotion and Commercial CTA Injected into Audit Output

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (32)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is narrowly about an 'env doctor' that analyzes local disk usage from development tools and supports selective cleanup decisions. The supplied code chunk instead is a top-level runner for a three-part doctor suite. Two of its three main actions are unrelated to disk-space cleanup: checking AGENTS.md/CLAUDE.md and auditing project-local skills. While it does invoke an env-doctor scan script, this chunk does not implement the advertised core behaviors such as per-directory classification, stale-tool detection, cleanup guidance, or interactive deletion. Therefore the actual behavior is materially broader/different than the declared purpose, with undeclared capabilities and a different primary role.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code matches part of the description: it scans local disk usage on Mac/Linux, focuses on developer-tool directories, and includes logic helpful for identifying stale version managers by checking shell loading, PATH presence, and runtime ownership. However, the declared description prominently promises a fuller 'doctor' that classifies items into three categories, gives official cleanup commands and cost explanations, and provides an interactive cleanup selector with guarded deletion behavior and dry-run support. None of those cleanup or interactive capabilities are present in this code chunk. Instead, the script is explicitly read-only and only emits raw scan data for later interpretation. This is a material description-versus-code mismatch, even if the scanner could be a supporting component of a larger system.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 29)May include surrounding context.

md
1. **删除只能来自用户逐项勾选**(走 `scripts/clean.sh`)。**模型自己不拼 `rm` 去跑**;用户说「你直接帮我删」→ 引导他跑选择器。默认全不选、数据类锁死、只跑白名单命令、输入 yes 才动手。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 63)May include surrounding context.

md
1. **删除只能来自用户逐项勾选**(走 `scripts/clean.sh`)。**模型自己不拼 `rm` 去跑**;用户说「你直接帮我删」→ 引导他跑选择器。默认全不选、数据类锁死、只跑白名单命令、输入 yes 才动手。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

md
1. **删除只能来自用户逐项勾选**(走 `scripts/clean.sh`)。**模型自己不拼 `rm` 去跑**;用户说「你直接帮我删」→ 引导他跑选择器。默认全不选、数据类锁死、只跑白名单命令、输入 yes 才动手。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 80)May include surrounding context.

md
1. **删除只能来自用户逐项勾选**(走 `scripts/clean.sh`)。**模型自己不拼 `rm` 去跑**;用户说「你直接帮我删」→ 引导他跑选择器。默认全不选、数据类锁死、只跑白名单命令、输入 yes 才动手。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 84)May include surrounding context.

md
1. **删除只能来自用户逐项勾选**(走 `scripts/clean.sh`)。**模型自己不拼 `rm` 去跑**;用户说「你直接帮我删」→ 引导他跑选择器。默认全不选、数据类锁死、只跑白名单命令、输入 yes 才动手。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

md
对照 `references/rules.md`:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 76)May include surrounding context.

md
对照 `references/rules.md`:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 100)May include surrounding context.

md
| 技能 | `hekouwang-claude-skill-doctor-skill` | `SKILL.md` 结构、死链、OpenClaw 声明 |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The skill includes a destructive recursive deletion command, rm -rf "$HOME/.nvm", presented as an official cleanup action. Even though the surrounding text says the user must confirm and run commands manually, this still creates a meaningful risk of unsafe deletion because the skill is specifically designed to classify directories as safe to remove and may misclassify active data or be over-trusted by users.

Content

Scanner excerpt · references/report.md (reported line 64)May include surrounding context.

  • 补充:其中 8.5 GB 是隐藏的 .cache(下载过的安装包),1.3 GB 是 4 个旧版本;其中 v16.20.2 与 fnm 里的重复
  • 官方处置(nvm README「Manual Uninstall」):
    bash
    rm -rf "$HOME/.nvm"
    
    ⚠️ 删完记得删掉 shell 配置里的 NVM_DIR / nvm.sh / bash_completion 三行,否则每开终端都会报错
  • 代价:以后要用 nvm 需重装(但你已经在用 fnm)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/rules.md (reported line 94)May include surrounding context.

md
| `~/Library/Developer/CoreSimulator/Devices` | 缓存(可重建) | `xcrun simctl delete unavailable` 清不可用模拟器 | 模拟器内已装 App 与数据会没 |
| `~/Library/Developer/Xcode/DerivedData` | 纯缓存 | 可整个删,Xcode 会重建 | 下次编译变慢 |
| `~/Library/Developer/Xcode/iOS DeviceSupport` | 缓存 | 可删旧 iOS 版本目录 | 调试对应版本真机时会重新生成 |
| `~/.cache/huggingface` | **数据(模型权重)** | `hf cache ls` 看占用 → `hf cache rm <repo>` 删指定 → `hf cache prune` 清无引用版本与断点残片 | ⛔ 重下动辄几小时;**官方载明「下新版本时旧版本不会自动删」**,所以只增不减 |
| `~/.ollama/models` | **数据(模型权重)** | `ollama list` → `ollama rm <model>` | ⛔ 重下耗时 |
| `~/.cache/torch` | 缓存(预训练权重) | 可删,会重下 | 重下耗时 |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/rules.md (reported line 94)May include surrounding context.

md
| `~/Library/Developer/CoreSimulator/Devices` | 缓存(可重建) | `xcrun simctl delete unavailable` 清不可用模拟器 | 模拟器内已装 App 与数据会没 |
| `~/Library/Developer/Xcode/DerivedData` | 纯缓存 | 可整个删,Xcode 会重建 | 下次编译变慢 |
| `~/Library/Developer/Xcode/iOS DeviceSupport` | 缓存 | 可删旧 iOS 版本目录 | 调试对应版本真机时会重新生成 |
| `~/.cache/huggingface` | **数据(模型权重)** | `hf cache ls` 看占用 → `hf cache rm <repo>` 删指定 → `hf cache prune` 清无引用版本与断点残片 | ⛔ 重下动辄几小时;**官方载明「下新版本时旧版本不会自动删」**,所以只增不减 |
| `~/.ollama/models` | **数据(模型权重)** | `ollama list` → `ollama rm <model>` | ⛔ 重下耗时 |
| `~/.cache/torch` | 缓存(预训练权重) | 可删,会重下 | 重下耗时 |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/rules.md (reported line 119)May include surrounding context.

md
| `~/.codex` | **数据** | Codex CLI 仍在用 | 不整删 | 丢 CLI 配置 |
| `~/.codebuddy` | **数据** | Codebuddy 仍在用 | 不整删 | 丢宿主配置 |
| `~/.agents/skills`(若存在) | **数据** | 多宿主统一 skills 入口 | 只删确认不用的 skill 子目录 | 该 skill 失效 |
| `~/.npm/_npx` | 缓存 | npx 一次性包 | `rm -rf ~/.npm/_npx` 或 `npm cache clean --force` | 下次 npx 重下 |
| `~/Library/Application Support/Cursor` | **数据+缓存混合** | Cursor 主程序数据 | 只清 `Cache`/`GPUCache` 子目录,别整删 Support | 可能丢窗口布局 |
| `~/Library/Application Support/Claude` | **数据** | Claude 桌面端 | 不整删 | 丢本地状态 |
| `~/.cache/ms-playwright` `~/Library/Caches/ms-playwright` | 缓存 | Playwright 测浏览器 | `npx playwright install --force` 可重建;或删对应缓存目录 | 下次测试重下浏览器(数百 MB~数 GB) |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/rules.md (reported line 119)May include surrounding context.

md
| `~/.codex` | **数据** | Codex CLI 仍在用 | 不整删 | 丢 CLI 配置 |
| `~/.codebuddy` | **数据** | Codebuddy 仍在用 | 不整删 | 丢宿主配置 |
| `~/.agents/skills`(若存在) | **数据** | 多宿主统一 skills 入口 | 只删确认不用的 skill 子目录 | 该 skill 失效 |
| `~/.npm/_npx` | 缓存 | npx 一次性包 | `rm -rf ~/.npm/_npx` 或 `npm cache clean --force` | 下次 npx 重下 |
| `~/Library/Application Support/Cursor` | **数据+缓存混合** | Cursor 主程序数据 | 只清 `Cache`/`GPUCache` 子目录,别整删 Support | 可能丢窗口布局 |
| `~/Library/Application Support/Claude` | **数据** | Claude 桌面端 | 不整删 | 丢本地状态 |
| `~/.cache/ms-playwright` `~/Library/Caches/ms-playwright` | 缓存 | Playwright 测浏览器 | `npx playwright install --force` 可重建;或删对应缓存目录 | 下次测试重下浏览器(数百 MB~数 GB) |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/clean.sh (reported line 33)May include surrounding context.

sh
# group: residue(残留·可清) / cache(缓存·可清) / data(数据·锁死)
# ⛔ 命令写死在这里,不从外部输入拼装
ENTRIES=(
  "residue|$HOME/.nvm|nvm(node 版本管理器)|rm -rf \"\$HOME/.nvm\"|以后要用 nvm 需重装;记得删 shell 里 NVM_DIR 那几行"
  "residue|$HOME/.pyenv|pyenv(python 版本管理器)|rm -rf \"\$HOME/.pyenv\"|以后要用 pyenv 需重装;记得删 shell 里 pyenv init 那几行"
  "residue|$HOME/.rbenv|rbenv(ruby 版本管理器)|rm -rf \"\$HOME/.rbenv\"|同上,注意 shell 配置"
  "residue|$HOME/.asdf|asdf(多语言版本管理器)|rm -rf \"\$HOME/.asdf\"|同上,注意 shell 配置"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/clean.sh (reported line 34)May include surrounding context.

sh
# ⛔ 命令写死在这里,不从外部输入拼装
ENTRIES=(
  "residue|$HOME/.nvm|nvm(node 版本管理器)|rm -rf \"\$HOME/.nvm\"|以后要用 nvm 需重装;记得删 shell 里 NVM_DIR 那几行"
  "residue|$HOME/.pyenv|pyenv(python 版本管理器)|rm -rf \"\$HOME/.pyenv\"|以后要用 pyenv 需重装;记得删 shell 里 pyenv init 那几行"
  "residue|$HOME/.rbenv|rbenv(ruby 版本管理器)|rm -rf \"\$HOME/.rbenv\"|同上,注意 shell 配置"
  "residue|$HOME/.asdf|asdf(多语言版本管理器)|rm -rf \"\$HOME/.asdf\"|同上,注意 shell 配置"
  "residue|$HOME/.volta|volta(node 工具链)|rm -rf \"\$HOME/.volta\"|同上,注意 shell 配置"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/clean.sh (reported line 35)May include surrounding context.

sh
ENTRIES=(
  "residue|$HOME/.nvm|nvm(node 版本管理器)|rm -rf \"\$HOME/.nvm\"|以后要用 nvm 需重装;记得删 shell 里 NVM_DIR 那几行"
  "residue|$HOME/.pyenv|pyenv(python 版本管理器)|rm -rf \"\$HOME/.pyenv\"|以后要用 pyenv 需重装;记得删 shell 里 pyenv init 那几行"
  "residue|$HOME/.rbenv|rbenv(ruby 版本管理器)|rm -rf \"\$HOME/.rbenv\"|同上,注意 shell 配置"
  "residue|$HOME/.asdf|asdf(多语言版本管理器)|rm -rf \"\$HOME/.asdf\"|同上,注意 shell 配置"
  "residue|$HOME/.volta|volta(node 工具链)|rm -rf \"\$HOME/.volta\"|同上,注意 shell 配置"
  "cache|$HOME/.npm|npm 缓存|npm cache clean --force|下次装包重下"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/clean.sh (reported line 36)May include surrounding context.

sh
"residue|$HOME/.nvm|nvm(node 版本管理器)|rm -rf \"\$HOME/.nvm\"|以后要用 nvm 需重装;记得删 shell 里 NVM_DIR 那几行"
  "residue|$HOME/.pyenv|pyenv(python 版本管理器)|rm -rf \"\$HOME/.pyenv\"|以后要用 pyenv 需重装;记得删 shell 里 pyenv init 那几行"
  "residue|$HOME/.rbenv|rbenv(ruby 版本管理器)|rm -rf \"\$HOME/.rbenv\"|同上,注意 shell 配置"
  "residue|$HOME/.asdf|asdf(多语言版本管理器)|rm -rf \"\$HOME/.asdf\"|同上,注意 shell 配置"
  "residue|$HOME/.volta|volta(node 工具链)|rm -rf \"\$HOME/.volta\"|同上,注意 shell 配置"
  "cache|$HOME/.npm|npm 缓存|npm cache clean --force|下次装包重下"
  "cache|$HOME/.cache/yarn|yarn 缓存|yarn cache clean|重下依赖"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/clean.sh (reported line 37)May include surrounding context.

sh
"residue|$HOME/.pyenv|pyenv(python 版本管理器)|rm -rf \"\$HOME/.pyenv\"|以后要用 pyenv 需重装;记得删 shell 里 pyenv init 那几行"
  "residue|$HOME/.rbenv|rbenv(ruby 版本管理器)|rm -rf \"\$HOME/.rbenv\"|同上,注意 shell 配置"
  "residue|$HOME/.asdf|asdf(多语言版本管理器)|rm -rf \"\$HOME/.asdf\"|同上,注意 shell 配置"
  "residue|$HOME/.volta|volta(node 工具链)|rm -rf \"\$HOME/.volta\"|同上,注意 shell 配置"
  "cache|$HOME/.npm|npm 缓存|npm cache clean --force|下次装包重下"
  "cache|$HOME/.cache/yarn|yarn 缓存|yarn cache clean|重下依赖"
  "cache|$HOME/Library/pnpm|pnpm store|pnpm store prune|只清无引用的包,很安全"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/clean.sh (reported line 44)May include surrounding context.

sh
"cache|$HOME/Library/Caches/Homebrew|Homebrew 下载缓存|brew cleanup|重下安装包"
  "cache|$HOME/Library/Caches/pip|pip 缓存|pip cache purge|重下 wheel"
  "cache|$HOME/.cache/uv|uv 缓存|uv cache clean|重下依赖"
  "cache|$HOME/Library/Developer/Xcode/DerivedData|Xcode 构建产物|rm -rf \"\$HOME/Library/Developer/Xcode/DerivedData\"|下次编译变慢,Xcode 会重建"
  "data|$HOME/.cache/huggingface|Hugging Face 模型权重|—|⛔ 重下要几小时,用 hf cache rm 精确删"
  "data|$HOME/Library/Containers/com.docker.docker|Docker 容器数据|—|⛔ 卷里可能有数据库数据"
  "data|$HOME/.ollama|Ollama 模型|—|⛔ 重下耗时,用 ollama rm 精确删"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/scan.sh (reported line 4)May include surrounding context.

sh
#!/usr/bin/env bash
# 开发环境体检 · 只读扫描器
#
# ⛔ 铁律:本脚本【只读】。全文不含 rm / rmdir / trash / unlink / mv / truncate 等任何破坏性命令。
#    它只负责「量体温」,判定与建议交给模型,删除动作永远交给用户本人执行。
#
# 用法:bash scan.sh                      # 全量扫描

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README advertises activation on a very broad, everyday-language phrase like '磁盘满了,帮我看看什么占了空间'. In an agent-skill environment, broad triggers can cause the skill to activate in contexts where the user did not explicitly request this specific tool, increasing the chance of unnecessary local disk inspection and, if the workflow proceeds, presenting deletion options for sensitive development directories.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The visible user-facing name, summary, and full description are written in Chinese, and the document provides prescribed response phrasing in Chinese only. There is no statement offering multilingual output or asking the user for language preference, which can violate language/locale choice policy.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list is broad enough to activate on generic disk-space complaints, even when the user's issue may involve non-development files outside the skill's safe scope. In an agentic environment, over-broad routing can cause inappropriate local scanning of the user's home directory, producing unnecessary exposure of file-system metadata and potentially leading to risky cleanup guidance in the wrong context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.