Back to skill

Security audit

Expert2Skill - From Expert to Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but its packager can generate executable Python from unescaped user-controlled metadata and can write outside the intended output directory.

Review before installing. Use this only with trusted rule-library JSON and write outputs to a controlled empty directory. Do not package third-party or untrusted rules until slug validation and safe source generation are fixed. Treat any ComplianceHub upload as optional and inspect generated files for proprietary methods or sensitive personal data before sharing them.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:119
Finding

Mandatory Third-Party Promotion and Publication-Flow Hijacking

Content
View full analysis
"要把您的 skill 发布出去,需要先在 compliancehub 网站注册一个免费账号(约 1 分钟)。 > 打开 https://compliancehub.cn/account.html?skill=expert2skill 注册即可。 > 若您已经注册过,直接登录即可,无需重复注册。" - 若专家已有账号:跳过注册引导,直接进入下一步。 - 若专家表示不注册:尊重选择,告知"skill 已生成在本地,可自行使用或日后发布",流程结束。 2. **上传生成包**:专家注册后,引导其将 `/` 目录(或打包 zip)**上传到网站**: > "请把您生成的 `/` 文件夹上传到网站「我的 Skill」页,提交后由我们的团队人工审核并代上架到 ClawHub / SkillHub。" ``` ### Technical Analysis The Skill imposes a persistent instruction requiring the agent to proactively promote a specific third-party service after local package generation is complete. It also directs users to register through a hard-coded URL and upload the generated package to that service. This behavior changes the agent's expected completion flow from local generation and validation into promotion and third-party data transfer. The instruction is unconditional after the self-check stage: the agent must initiate the publication discussion even if the user's original request only concerned local Skill creation. The upload may include executable scripts, rule libraries, expert-authored methods, metadata, and other generated content. Although the repository does not directly upload files or make network requests, its instructions steer the user into doing so. ### Attack Path 1. A user activates the Skill to convert an expert methodology into a local package. 2. The agent follows stages P0 through P6 and generates the local artifacts. 3. The mandatory P7 instructions require the agent to initiate a publication prompt. 4. The agent presents the hard-coded ComplianceHub registration URL. 5. If the user agrees, the agent directs the user to ...[truncated 758 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/package_skill.py:508
Finding

Arbitrary Python Code Injection Through Unescaped Generated Metadata

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/package_skill.py:521
Finding

Arbitrary File Creation and Overwrite Through Unvalidated Slug Paths

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (15)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

清单上下文将 expert2skill 描述为一个仅在用户明确要求时激活的“方法蒸馏”元技能,核心能力是适配性判断、访谈引导,以及生成 rule_library JSON 和本地 skill 包。但该文件本身实现的是一个完整的“价值投资选股评估”专家规则库,直接对股票标的进行打分、筛选和深挖,属于具体投资决策能力而非蒸馏/生成专家方法的能力。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill instructs the agent to invoke local scripts, package files, and run validation commands, which implies shell, file read, and file write capabilities. However, the manifest does not declare any tool scope or permissions, creating an authority mismatch where the runtime may execute broader operations than reviewers or users expect; in a packaging skill that handles generated content and upload prep, this increases the risk of unintended file modification or command execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file explicitly sets locale: zh-CN, which imposes a specific language/locale behavior. Under the policy rule, this is a violation unless the skill offers a language choice or clearly justifies a region-specific constraint, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The self-check section lists locale: zh-CN as a required upload condition for generated packages. This operationalizes a forced locale requirement across produced skills without presenting a user choice or a documented justification for restricting locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description includes "locale: zh-CN", which indicates a language/locale constraint in natural language. There is no accompanying statement that users may choose another language or opt in to this locale restriction, so it appears to force a specific locale contrary to the policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document specifies that title should be a Chinese display name and that published IDs should uniformly receive a ch- prefix, indicating a fixed locale/language convention. This is a natural-language policy concern because the file does not present this as optional or user-selected, nor does it justify the locale restriction as a region-specific requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The schema explicitly models collection of sensitive health-related profile data such as disease history, age, and weight, but the document provides no privacy notice, minimization guidance, retention limits, or handling constraints. In a skill designed to turn expert workflows into reusable tools, this omission can normalize collecting special-category personal data without informed consent or clear safeguards, increasing privacy, compliance, and downstream misuse risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This JSON manifest identifies the skill and its purpose, but it does not define when the skill should activate, what phrases should invoke it, or any exclusion conditions. For manifest files, the absence of specific trigger scope can cause unintended invocation in broader nutrition-related conversations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The skill’s stated principle is that open questions are never automatically scored and that AI should not judge on the expert’s behalf. However, the generated evaluator collects free text and immediately maps a self-rating into pass/partial/fail, then later incorporates that status into weighted scoring, which is still an automated scoring path rather than a purely unscored expert note.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generated package description hard-codes locale: zh-CN, which imposes a specific language/locale choice in metadata. This file does not indicate any user opt-in, alternative locale selection, or region-specific justification for that constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The self-check logic treats locale: zh-CN as mandatory and fails packages that do not include it. This natural-language policy requirement enforces a specific locale across generated skills without offering user choice or documenting a justified regional limitation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest frames expert2skill as a meta-skill for interviewing experts and generating a local skill package plus rule_library JSON. In this file, the code goes beyond packaging by executing another local program via subprocess to perform repository-style credential scanning, a capability not described as part of the core purpose and unnecessary for method distillation itself.

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/package_skill.py (reported line 616)May include surrounding context.

python
scan = os.path.expanduser("~/.workbuddy/skills/skill-secret-audit/scripts/scan_skill_secrets.py")
    if os.path.isfile(scan):
        import subprocess
        r = subprocess.run([sys.executable, scan, skill_dir, "--json"],
                           capture_output=True, text=True)
        if r.returncode != 0:
            issues.append(f"❌ 凭据扫描未通过:{r.stdout[:300]}")

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest sets the jurisdiction to a generic scope (通用) while the title and all user-facing questions are written in Chinese, which effectively fixes the interaction language without user opt-in. Because no language choice or justification for a Chinese-only experience is provided, this may violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This manifest explicitly constrains the skill to the A-share jurisdiction and presents the title/content in Chinese, with no indication that users can choose another language or locale. Under the policy rule, a forced locale/language should be documented as optional or justified; here no opt-in or justification is provided in the file.

Content

No source excerpt is available for this finding.