Back to skill

Security audit

Skill Admission Gate(技能上架安全闸门)

Security checks for vulnerabilities and agentic risk

Overview

This security scanner needs review because packages can approve their own risks and blocked results can still pass automated gates.

Use this only as an advisory scanner until approval validation, batch failure behavior, instruction-file handling, and fingerprint coverage are corrected. Independently review exceptions, skipped files, and individual results before installing another package. Scan in a restricted workspace without external symlinks and choose a fresh report destination. No malicious payload was found; the material concerns are bypassable safeguards and file handling that contradicts its documentation.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan_skill.py
Finding

Untrusted packages can approve their own blocked findings

Content
View full analysis

Impact

A package containing a detected shutil.rmtree(...) call can change from BLOCK to PASS, with single-scan exit status 0, by bundling an exception for DES-03. Other detected rules can be suppressed in the same way, bypassing verdict-based admission without reviewer approval.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan_skill.py
Finding

Batch mode returns success despite BLOCK results

Content
View full analysis

Impact

An exit-status-based batch gate continues despite detecting a blocked package; the package need not evade any detection pattern.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (17)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The reported implementation weaknesses would let an untrusted package suppress blocking findings through self-supplied exceptions, evade coverage, or pass a batch CI gate despite BLOCK results; unrestricted paths and symlink traversal could additionally expose files or overwrite reports outside the intended scope. These are especially consequential in a pre-installation security gate, although the implementation is not included here, so the code-level allegations cannot be independently verified from this source.

Content

No source excerpt is available for this finding.

Instruction Override

High
Category
Prompt Injection
Confidence
80% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

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

md
| | EXE-03,04 | WARN | `eval(`/`exec(`, post-base64-decode exec |
| **Exfiltration** | EXF-01,02 | **BLOCK** | reading private keys / credential files, reading local vaults and key-drop tools |
| | EXF-03,04 | WARN | reading `.env`/env credentials, POST/PUT to external endpoints |
| **Prompt injection** | INJ-01,02 | **BLOCK** | "ignore previous instructions", "do not tell the user" |
| | INJ-03~05 | WARN | silent execution, bypassing security/approvals, tricking users into pasting keys |
| **Obfuscation** | OBF-01 | WARN | overlong Base64 strings (suspected payload) |
| **Scope** | SCP-01 | WARN | writing absolute paths outside the skill dir |

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
* | EXE-01,02 | **BLOCK** | `curl|sh`, encoded PowerShell, `iex(` |
| | EXE-03,04 | WARN | `eval(`/`exec(`, post-base64-decode exec |
| **Exfiltration** | EXF-01,02 | **BLOCK** | reading private keys / credential files, reading local vaults and key-drop tools |
| | EXF-03,04 | WARN | reading `.env`/env credentials, POST/PUT to external endpoints |
| **Prompt injection** | INJ-01,02 | **BLOCK** | "ignore previous instructions", "do not tell the user" |
| | INJ-03~05 | WARN | silent execution, bypassing security/approvals, tricking users into pasting keys |
| **Obfuscation** | OBF-01 | WARN | overlong Base64 strings (suspected payload) |
| **Scope** | SCP-01 | WARN | writing absolute paths outside the skill dir |

**Verdict**: any BLOCK hit → overall `BLOCK`; only WARN → `WARN`; none → `PASS`.

### V. Accepted-risk mechanism (key design)

**False positives are inevitable** — e.g. a local-vault skill "reading <local-vault>" is its *job*, not exfiltration.

But "accepting a risk" m

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

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

Content

Scanner excerpt · scripts/scan_skill.py (reported line 35)May include surrounding context.

python
("EXE-04", "WARN",  "Base64 解码后执行", r"b64decode[^\n]{0,60}(exec|eval|system)|atob\([^\n]{0,60}\)"),

    # —— 数据外泄 ——
    ("EXF-01", "BLOCK", "读取私钥/凭据文件", r"id_rsa|\.ssh/|\.aws/credentials|\.netrc|\.pgpass|\.kdbx"),
    ("EXF-02", "BLOCK", "读取本地保险库/密钥投递工具", r"ucvault|key_drop|_localmem_memories"),
    ("EXF-03", "WARN",  "读取 .env / 环境凭据", r"\.env\b|os\.environ\[[^\]]*(KEY|TOKEN|SECRET|PASS)"),
    ("EXF-04", "WARN",  "向外部端点发送数据", r"requests\.(post|put)\s*\(|curl[^\n]{0,80}-[Xd]|Invoke-RestMethod[^\n]*-Method\s+(POST|PUT)"),

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · scripts/scan_skill.py (reported line 35)May include surrounding context.

python
("EXE-04", "WARN",  "Base64 解码后执行", r"b64decode[^\n]{0,60}(exec|eval|system)|atob\([^\n]{0,60}\)"),

    # —— 数据外泄 ——
    ("EXF-01", "BLOCK", "读取私钥/凭据文件", r"id_rsa|\.ssh/|\.aws/credentials|\.netrc|\.pgpass|\.kdbx"),
    ("EXF-02", "BLOCK", "读取本地保险库/密钥投递工具", r"ucvault|key_drop|_localmem_memories"),
    ("EXF-03", "WARN",  "读取 .env / 环境凭据", r"\.env\b|os\.environ\[[^\]]*(KEY|TOKEN|SECRET|PASS)"),
    ("EXF-04", "WARN",  "向外部端点发送数据", r"requests\.(post|put)\s*\(|curl[^\n]{0,80}-[Xd]|Invoke-RestMethod[^\n]*-Method\s+(POST|PUT)"),

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 · scripts/scan_skill.py (reported line 37)May include surrounding context.

python
# —— 数据外泄 ——
    ("EXF-01", "BLOCK", "读取私钥/凭据文件", r"id_rsa|\.ssh/|\.aws/credentials|\.netrc|\.pgpass|\.kdbx"),
    ("EXF-02", "BLOCK", "读取本地保险库/密钥投递工具", r"ucvault|key_drop|_localmem_memories"),
    ("EXF-03", "WARN",  "读取 .env / 环境凭据", r"\.env\b|os\.environ\[[^\]]*(KEY|TOKEN|SECRET|PASS)"),
    ("EXF-04", "WARN",  "向外部端点发送数据", r"requests\.(post|put)\s*\(|curl[^\n]{0,80}-[Xd]|Invoke-RestMethod[^\n]*-Method\s+(POST|PUT)"),

    # —— 提示注入 / 隐蔽行为(主要在 SKILL.md / 指令文本)——

Prompt injections in skill instruction documents are automatically reduced from blocking findings to warnings.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Every match in a document-format file is downgraded solely because of its extension, including blocking prompt-injection matches in SKILL.md. Skill documents are operational instructions for agents, not necessarily passive documentation, so an attacker can place malicious instructions in their expected location and avoid a BLOCK verdict; single-package execution also returns success for WARN.

Content

No source excerpt is available for this finding.

Risk acceptance bypasses the gate without the signature required by the documentation.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The scanner trusts an acceptance file inside the untrusted package and removes every finding matching an accepted rule from the gate decision. Neither approval authority nor required approval fields are validated, so a package author can suppress blocking findings using self-supplied exceptions, potentially producing PASS despite detected dangerous behavior.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

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

md
### I. Why it is needed
The security problem of the skill ecosystem is **not "are there malicious packages" but "there is no admission gate"**:

- Skills can execute arbitrary code, access the filesystem and make network requests — their permission surface equals a local program;
- Yet their distribution often looks like "a block of documentation" — review intuition fails;
- Once installed, it runs on your machine as you.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · SKILL.md (reported line 128)May include surrounding context.

skill: my-skill verdict: WARN | BLOCK 0 | WARN 2 | accepted 0 | 6 files scanned package fingerprint: cd23896eee940857 [WARN] EXF-04 script.py:41 requests.post("https://api.example.com/collect", ...)

text
Exit codes: `0` = no BLOCK; `1` = BLOCK (usable as CI gate).

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · SKILL.md (reported line 262)May include surrounding context.

技能: my-skill 判定: WARN | BLOCK 0 | WARN 2 | 已接受 0 | 扫描 6 文件 包指纹: cd23896eee940857 [WARN] EXF-04 script.py:41 requests.post("https://api.example.com/collect", ...)

text

**退出码**:`0` = 非 BLOCK;`1` = BLOCK(可用于 CI 阻断)。

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 · SKILL.md (reported line 128)May include surrounding context.

skill: my-skill verdict: WARN | BLOCK 0 | WARN 2 | accepted 0 | 6 files scanned package fingerprint: cd23896eee940857 [WARN] EXF-04 script.py:41 requests.post("https://api.example.com/collect", ...)

text
Exit codes: `0` = no BLOCK; `1` = BLOCK (usable as CI gate).

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 · SKILL.md (reported line 262)May include surrounding context.

技能: my-skill 判定: WARN | BLOCK 0 | WARN 2 | 已接受 0 | 扫描 6 文件 包指纹: cd23896eee940857 [WARN] EXF-04 script.py:41 requests.post("https://api.example.com/collect", ...)

text

**退出码**:`0` = 非 BLOCK;`1` = BLOCK(可用于 CI 阻断)。

Excluded directories are omitted from both the claimed whole-package scan and the package fingerprint.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Directory pruning occurs before both content scanning and hashing, so files under excluded names such as _backup or node_modules receive neither inspection nor fingerprint coverage. An attacker can hide payloads in these locations, and changes there will not alter the reported package fingerprint, undermining the scanner's whole-package integrity claims.

Content

No source excerpt is available for this finding.

Batch mode exits successfully even when scanned packages receive BLOCK verdicts.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Batch mode unconditionally returns zero even when its results contain BLOCK verdicts. Although the output reports those verdicts, installation or CI workflows that rely on process status can interpret the scan as successful and admit blocked packages.

Content

No source excerpt is available for this finding.

The trigger phrase “能不能装” (“can it be installed?”) is too broad for a skill-specific security audit.

Low
Category
Trigger Abuse
Confidence
90% confidence
Finding

The explicit trigger list includes “能不能装,” which can occur in ordinary questions about installing unrelated software or hardware. Although the surrounding description concerns skill admission checks, the trigger itself does not require a skill/plugin reference or specify that unrelated installation questions are excluded.

Content

No source excerpt is available for this finding.

Trigger keywords can activate the skill outside skill/plugin admission reviews.

Low
Category
Trigger Abuse
Confidence
90% confidence
Finding

The trigger lists include unqualified phrases such as “能不能装” (can it be installed), “木马” (Trojan), “后门” (backdoor), and “提示注入” (prompt injection). These can occur in ordinary software-installation questions or general security discussions, but the file does not explicitly require a skill/plugin review context when matching these keywords.

Content

No source excerpt is available for this finding.