Back to skill

Security audit

deep-skill-finder

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real skill search and installer, but its installer can write downloaded skill content outside the chosen skills directory if given a crafted skill name.

Review before installing. Only use this skill if you trust its remote skill registry and are comfortable with it searching online, writing into your skills directory, keeping an anonymous local client ID, and optionally uploading reviewed feedback and image/video attachments. Until the installer validates skill names, avoid installing any result whose name contains slashes, dots, path-like text, or unusual characters, and prefer manual inspection or a sandboxed skills directory.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/deep_skill_install.py:290
Finding

Unvalidated Skill Name Allows Writes Outside the Selected Installation Directory

Content
View full analysis

Vulnerability Details

File Location: scripts/deep_skill_install.py, lines 290–326
Vulnerability Type: Path traversal leading to arbitrary file write
Risk Level: High

Vulnerable Code

python
def install_skill(skill_name: str, target_dir: Path, agent_type: str = None) -> bool:
    """安装 skill 主流程。target_dir 为当前 Agent 的 skills 目录。"""
    # 内置 skill 不允许通过脚本覆盖
    if _is_builtin_skill(skill_name):
        print(f"✗ '{skill_name}' 是内置 skill,由桌面端自动管理,无需安装", file=sys.stderr)
        return False

    target_dir.mkdir(parents=True, exist_ok=True)

    print(f"  安装 skill '{skill_name}' 到 {target_dir}...")

    # 获取元数据(用于 version 和 skillMdContent 兜底)
    metadata = get_skill_metadata(skill_name)
    version = _get_version(metadata)

    skill_dir = target_dir / skill_name
    skill_dir.mkdir(parents=True, exist_ok=True)
    success = False

    # 下载 zip 包(包含完整文件如 scripts/);非 zip 则当作单文件 SKILL.md
    try:
        print(f"  下载 zip 包 (version={version})...", file=sys.stderr)
        data = download_skill_zip(
            skill_name,
            version if version != "unknown" else None,
            agent_type=agent_type,
        )
        if data[:4] == b'PK\x03\x04':
            success = install_from_zip(data, skill_name, target_dir)
        else:
            print("  ⚠ 下载内容非 zip 格式,保存为 SKILL.md", file=sys.stderr)
            (skill_dir / "SKILL.md").write_bytes(data)
            success = True
    except Exception as e:
        print(f"  ⚠ 下载失败: {e},回退到 skillMdContent", file=sys.stderr)

    # 回退:使用 /skills/{name} 返回的 skillMdContent(仅 SKILL.md,不含 scripts)
    if not success:
        skill_md_content = metadata.get("skillMdContent", "")
        if skill_md_content:
            (skill_dir / "SKILL.md").write_text(
                skill_md_content,
                encoding="utf-8",
            )
            success = True

Technical Analysis

`skill_na ...[truncated 3182 chars]

Remediation
View remediation

Remediation Suggestions

  1. Validate skill_name before _is_builtin_skill(), directory creation, network access, or metadata processing. Use a strict slug allowlist consistent with the uninstall path:

    python
    SKILL_NAME_RE = re.compile(r"^[A-Za-z0-9_-]+$")
    
    if not SKILL_NAME_RE.fullmatch(skill_name):
        raise ValueError("Invalid skill name")
    
  2. Reject absolute paths and special path components explicitly:

    python
    candidate = Path(skill_name)
    if candidate.is_absolute() or any(part in {".", ".."} for part in candidate.parts):
        raise ValueError("Invalid skill path")
    
  3. Resolve and enforce containment before creating or writing anything:

    python
    target_root = target_dir.expanduser().resolve()
    skill_dir = (target_root / skill_name).resolve()
    
    try:
        skill_dir.relative_to(target_root)
    except ValueError:
        raise ValueError("Skill destination escapes target directory")
    
  4. Use Path.relative_to() or os.path.commonpath() for archive-output containment checks. Do not use string-prefix comparisons, because sibling paths can share the same textual prefix.

  5. Apply the same validated destination to direct SKILL.md writes, metadata fallback writes, archive extraction, and .meyo/origin.json creation.

  6. Add regression tests for ../escape, nested traversal, absolute POSIX paths, Windows drive paths, UNC paths, separators, and names resembling a valid directory prefix.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (42)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior includes discovering used skills from local session files, sanitizing feedback payloads, and uploading data and attachments to remote endpoints, which goes far beyond finding skills. Because these capabilities are bundled into a benign-seeming skill, they can be invoked in contexts where the user did not expect local data mining or outbound transfer.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior includes discovering used skills from local session files, sanitizing feedback payloads, and uploading data and attachments to remote endpoints, which goes far beyond finding skills. Because these capabilities are bundled into a benign-seeming skill, they can be invoked in contexts where the user did not expect local data mining or outbound transfer.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior includes discovering used skills from local session files, sanitizing feedback payloads, and uploading data and attachments to remote endpoints, which goes far beyond finding skills. Because these capabilities are bundled into a benign-seeming skill, they can be invoked in contexts where the user did not expect local data mining or outbound transfer.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The activation scope is overly broad and explicitly allows autonomous invocation whenever the agent thinks external help may be useful. Combined with installation, local inspection, and networked workflows, this creates a large opportunity for unnecessary execution and unintended data access without a clear user request.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill embeds a full feedback-upload workflow with attachment processing and remote submission, which is outside the expected scope of discovery/installation and introduces meaningful exfiltration risk. Handling screenshots and videos is particularly sensitive because attachments may contain secrets, personal data, or proprietary content even if the user is asked to review them.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes automatic remote upload of evaluation content and attachments without a strong, prominent upfront warning at the start of the workflow. Because attachments and evaluation text may contain sensitive information, users need clear notice before collection and transfer rather than learning this deep in the instructions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The uninstall flow performs recursive deletion of a skill directory with no confirmation or dry-run safeguard. Although the name and path checks reduce traversal risk, an accidental or scripted invocation can still cause irreversible local data loss within the target skills directory.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The install instructions tell users to have their agent download from a remote URL, extract into a local skills directory, and enable the skill, but they do not prominently warn that this imports and activates remote content on the local machine. That omission weakens informed consent and increases the likelihood that users delegate a supply-chain-sensitive action to an agent without understanding the trust and execution implications.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README says DSF triggers automatically whenever a task 'needs an external Skill' or when the agent judges it lacks the right tool, but it does not define hard boundaries, approval checkpoints, or safe defaults. In an agentic environment, broad autonomous triggering can cause unplanned remote lookups, recommendation flows, or installation attempts in contexts where users did not intend any external dependency or data sharing.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 131)May include surrounding context.

md
User describes the task in natural language
              │
              ▼
    Task understanding & query rewrite
 (goal · I/O · direction · constraints · environment)
              │
              ▼

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README presents conflicting security-relevant behavior: one section claims DSF only recommends skills and always requires explicit confirmation, while earlier sections describe download, extraction, enabling, and later automatic installation after a numeric confirmation. For a tool that installs executable skills from remote sources, misleading operators about whether code can be fetched or activated materially increases the risk of unintended code execution and unsafe trust decisions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 336)May include surrounding context.

md
## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=wheelry/deep-skill-finder&type=Date)](https://star-history.com/#wheelry/deep-skill-finder&Date)

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.zh.md (reported line 366)May include surrounding context.

md
## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=wheelry/deep-skill-finder&type=Date)](https://star-history.com/#wheelry/deep-skill-finder&Date)

---

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README instructs the agent to download, extract, and enable the skill immediately, which conflicts with later claims that installation only proceeds after explicit user confirmation. In an agentic environment, this kind of contradictory documentation can normalize silent installation of remote code or capabilities before the user has approved them.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is substantively the same issue as SDI-1: the document says explicit confirmation is required, but the provided install prompt directs the agent to perform the full install and enable sequence directly. That inconsistency weakens trust boundaries and can lead users or agents to treat remote installation as pre-authorized.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is described as auto-triggering whenever the agent believes an external skill may help, without narrow scope, exclusions, or consent boundaries. In practice, this broad activation policy can cause unnecessary calls to external services, autonomous tool chaining, or unsolicited installation recommendations in situations where the user did not ask for them.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill exposes substantial capabilities—shell, network, file read/write, and environment access—without declaring any tool scope or permission boundaries. For a skill whose primary purpose is discovery/recommendation, this creates an unnecessary trust gap and makes it harder for a host agent or user to understand and constrain what the skill may do.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown instructs that script errors must be translated into '用户友好的中文提示', and the entire prescribed interaction format is Chinese-only. This imposes a locale/language choice without user opt-in and is not documented as a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Instructing the agent to inspect environment variables, system prompts, and local identity files to infer agent type expands data access beyond what is necessary for finding or recommending skills. System prompts and identity/config files can contain sensitive deployment details, making this an avoidable privacy and secret-exposure risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file contains user-facing operational instructions exclusively in Chinese, with no indication that the user may choose another language or that the locale restriction is required for a region-specific purpose. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes a discovery/search assistant for locating suitable skills, not a skill manager that installs or removes them on disk. This file implements downloading archives from a registry, extracting them into the agent's skills directory, deleting installed skills, and writing metadata, which materially exceeds pure 'find skill' behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This script persists a client ID under the user's home directory and reads authentication tokens from ~/.meyo_agent/app.config.json or environment variables before making authenticated requests. For a skill framed as finding the best matching skill from feedback and evaluations, credential access and persistent client tracking are broader capabilities than the manifest describes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The installer writes downloaded content directly into the provided skills directory without any confirmation, trust prompt, or signature/integrity validation. In a skill ecosystem, installing untrusted remote content can enable code execution or persistent malicious behavior once the host agent loads the installed skill.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% 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 · scripts/deep_skill_install.py (reported line 431)May include surrounding context.

python
else:
        parser.print_help()
        print("\n示例:")
        print("  deep_skill_install.py hv-analysis --dir ~/.claude/skills --agent-type openclaw")
        print("  deep_skill_install.py hv-analysis --dir ~/.claude/skills --uninstall")
        print("  deep_skill_install.py --dir ~/.claude/skills --list")

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% 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 · scripts/deep_skill_install.py (reported line 432)May include surrounding context.

python
else:
        parser.print_help()
        print("\n示例:")
        print("  deep_skill_install.py hv-analysis --dir ~/.claude/skills --agent-type openclaw")
        print("  deep_skill_install.py hv-analysis --dir ~/.claude/skills --uninstall")
        print("  deep_skill_install.py --dir ~/.claude/skills --list")

Static analysis

No suspicious patterns detected.