Back to skill

Security audit

Claude Skill 体检器(SKILL.md Doctor)

Security checks for vulnerabilities and agentic risk

Overview

ClawScan’s verdict is benign with medium confidence: the scanners found no decisive sign of harmful behavior, but SkillSpector’s review was partial, so some evidence remains incomplete.

The verdict is benign, but confidence is medium and the scan was partial: 17 of 19 components were fully inspected, two were partially inspected, and obfuscated text plus a bounded parser limit left some checks incomplete. Consider whether you are comfortable with that coverage and with the environment-variable access and Docker image references before installing.

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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (27)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **署名**:报告结尾固定带 `—— 会勇禾口王的AI笔记 · @huiyonghkw`。命令行 `check.py` 的报告页脚已内置该署名。

Incomplete referenced artifact analysis

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
- **免费(开源内核)**:`check.py` 的**文本 / JSON 报告 + 评分**。任何人本地或进 CI 随便跑。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
所以它是**可选叠加档、不进默认流程**——`check.py` 的零依赖卖点不受影响,不跑也能出完整体检报告。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2b. **深度安全扫描(可选 · 外部工具 SkillSpector)**:`check.py` 的 #0 只做密钥正则;当要查**提示注入 / 数据外泄 / 隐藏指令 / 供应链 / 过度授权 / MCP 越权**等 68 类模式时,叠加跑 [SkillSpector](https://github.com/NVI

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**第三方 skill 只在一次性沙箱/容器里跑**,并用最小权限的 Claude 凭据;默认体检只走 `check.py`。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **`check.py` 不依赖它**,零依赖那条卖点不受影响;这一档是叠加的,不跑也能出完整体检报告。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
5. **提出代重构**:问用户要不要直接改(瘦身 SKILL.md、拆 references/、外置 scripts/、把硬路径换成 `~`/相对路径、补 description 触发句)。**得到同意再动文件**,一次改一类、可回退;改完**重跑 `check.py`** 给前后对比分数。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 改完**重新跑一次 `check.py`** 给前后对比分数。

Code capability 'env' detected in check.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · check.py (reported line 536)May include surrounding context.

python
"""密钥文件永远不打开:扩展名规则 + 名称规则双保险。"""
    base = os.path.basename(rel).lower()
    return (
        base == ".env" or base.startswith(".env.") or
        base.endswith((".key", ".pem")) or "secret" in base
    )

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tests/test-frontmatter.sh (reported line 21)May include surrounding context.

sh
# 这些文件必须存在,但 Doctor 不能打开它们。
fake_prefix='sk-'
fake_suffix='ant-should-not-be-read-123456789012345'
printf 'api_key="%s%s"\n' "$fake_prefix" "$fake_suffix" > "$TMP/nested/.env"
printf 'api_key="%s%s"\n' "$fake_prefix" "$fake_suffix" > "$TMP/nested/private.secret.txt"

if ! python3 "$CHECK" "$TMP/nested" --json > "$TMP/nested.json"; then

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/trigger_eval.py (reported line 82)May include surrounding context.

python
def build_env(extra=()):
    """子进程最小环境:只放 claude CLI 跑起来必需的变量。"""
    keep = ENV_ALLOW | set(extra)
    return {k: v for k, v in os.environ.items()
            if k != "CLAUDECODE" and (k in keep or k.startswith(ENV_ALLOW_PREFIX))}

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tests/test-frontmatter.sh (reported line 22)May include surrounding context.

sh
fake_prefix='sk-'
fake_suffix='ant-should-not-be-read-123456789012345'
printf 'api_key="%s%s"\n' "$fake_prefix" "$fake_suffix" > "$TMP/nested/.env"
printf 'api_key="%s%s"\n' "$fake_prefix" "$fake_suffix" > "$TMP/nested/private.secret.txt"

if ! python3 "$CHECK" "$TMP/nested" --json > "$TMP/nested.json"; then
  echo '❌ BOM + 嵌套 metadata 的合法 Skill 被阻断'

Docker image referenced without tag or digest: 'docker run --rm'.

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Docker image referenced without tag or digest: 'docker run --rm'.

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Docker image referenced without tag or digest: 'docker run --rm'.

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Docker image referenced without tag or digest: 'docker run --rm'.

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Docker image referenced without tag or digest: 'docker run --rm'.

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

L141 requires reports to be output in Chinese without offering the user a language choice.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The report-generation step explicitly instructs “中文输出” (output in Chinese), regardless of the user's preferred language. The skill provides neither a language opt-in nor a locale-specific justification for this restriction.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/trigger_eval.py (reported line 169)May include surrounding context.

python
# 剥掉 CLAUDECODE(否则嵌套调用被守卫拦下),其余只放白名单变量
        env = build_env(pass_env)

        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                                stderr=subprocess.DEVNULL,
                                cwd=project_root, env=env)
        buffer, pending, acc = "", None, ""

The skill has no description or activation criteria to define when it should be invoked.

Medium
Category
Trigger Abuse
Confidence
97% confidence
Finding

The frontmatter provides only a name, with no description defining the skill's purpose or invocation scope. Line 10 explicitly acknowledges that the missing description prevents the model from determining when to load the skill.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · tests/test-suite-fail-closed.sh (reported line 15)May include surrounding context.

sh
"$TMP/doctors/hekouwang-claude-md-doctor-skill" \
  "$TMP/doctors/hekouwang-claude-skill-doctor-skill" \
  "$TMP/doctors/hekouwang-env-doctor-skill/scripts"
printf '%s\n' '# fake skill' > "$TMP/project/.agents/skills/example/SKILL.md"
printf '%s\n' \
  'import json' \
  'import sys' \

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% 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 · Dockerfile (reported line 15)May include surrounding context.

dockerfile
# 把要体检的 skill 目录只读挂到 /work:
#   docker build -t claude-skill-doctor .
#   docker run --rm -v "$PWD:/work:ro" claude-skill-doctor
#   docker run --rm -v "$PWD:/work:ro" claude-skill-doctor /work --json
ENTRYPOINT ["python3", "/app/check.py"]
CMD ["/work"]

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% 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 · Dockerfile (reported line 16)May include surrounding context.

dockerfile
# 把要体检的 skill 目录只读挂到 /work:
#   docker build -t claude-skill-doctor .
#   docker run --rm -v "$PWD:/work:ro" claude-skill-doctor
#   docker run --rm -v "$PWD:/work:ro" claude-skill-doctor /work --json
ENTRYPOINT ["python3", "/app/check.py"]
CMD ["/work"]

Tool Parameter Abuse

Low
Category
Tool Misuse
Confidence
15% 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 · README.md (reported line 72)May include surrounding context.

bash
# 拉已钉死 digest 的镜像;工作目录只读挂载(打 v* tag 时 Actions 同步发布到 GHCR)
IMG=ghcr.io/huiyonghkw/hekouwang-claude-skill-doctor-skill@sha256:<发布页当前 digest>
docker run --rm -v "$PWD:/work:ro" "$IMG"

# 或本地自建(Dockerfile 已 FROM python:3.12-slim@sha256:…)
docker build -t claude-skill-doctor .