Back to skill

Security audit

self-correction

Security checks for vulnerabilities and agentic risk

Overview

This is a Chinese-language self-correction skill with some broad trigger wording and auxiliary packaging scripts, but no hidden execution, credential access, network use, persistence, or destructive behavior was found.

Install only if you want a Chinese-language self-correction behavior that may trigger on broad disagreement or follow-up phrases. Treat the included packaging validator as a convenience check, not a comprehensive security review of future package contents.

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

Warning
Location
scripts/validate_skill.py:116
Finding

Executable Package Contents Are Excluded from Security Validation

Content
View full analysis

Vulnerability Details

File Location: scripts/validate_skill.py:116-130
Related Location: scripts/package_skill.py:37-46
Vulnerability Type: Incomplete security validation of packaged files
Risk Level: Medium

Vulnerable Code

scripts/validate_skill.py:116-130:

python
def validate_no_secrets(skill_dir):
    """Check whether keys or sensitive information are exposed (only SKILL.md and _meta.json)."""
    # Only check core skill files, not scripts directory
    forbidden_patterns = [
        r'password\s*=\s*["\'][^"\']+["\']',
        r'api_key\s*=\s*["\'][^"\']+["\']',
        r'secret_key\s*=\s*["\'][^"\']+["\']',
        r'token\s*=\s*["\'][^"\']+["\']',
        r'-----BEGIN.*PRIVATE KEY-----',
    ]

    # Only check core skill files
    files_to_check = [
        os.path.join(skill_dir, 'SKILL.md'),
        os.path.join(skill_dir, '_meta.json'),
    ]

scripts/package_skill.py:37-46:

python
# Collect all files to package
files_to_package = []
for root, dirs, files in os.walk(skill_dir):
    # Skip directories such as __pycache__
    dirs[:] = [d for d in dirs if d not in ['__pycache__', '.git', '.venv']]

    for file in files:
        file_path = os.path.join(root, file)
        rel_path = os.path.relpath(file_path, skill_dir)
        files_to_package.append((file_path, rel_path))

Technical Analysis

The security validator intentionally examines only SKILL.md and _meta.json. In contrast, the packaging routine recursively includes every file beneath the supplied skill directory except files in three excluded directory names.

This mismatch means executable Python files, shell scripts, configuration files, credential files, and unexpected binary content can be incorporated into the resulting .skill archive without undergoing the advertised secret scan. The validation process can therefore report that the security check passed ...[truncated 2203 chars]

Remediation
View remediation

Remediation Suggestions

  1. Build one canonical package manifest before validation and use that exact immutable manifest for both validation and archive creation.
  2. Recursively inspect every regular file selected for packaging, including all files under scripts/.
  3. Use an explicit allowlist of permitted paths, extensions, and file types. Reject unexpected executable files, binaries, device files, and other unsupported content.
  4. Reject symbolic links, or securely resolve them and verify that their targets remain inside the intended skill root.
  5. Apply secret scanning to every textual file using broader credential detection and entropy-based checks. Treat pattern matching as one defense layer rather than a complete security guarantee.
  6. Add static analysis for executable files and require manual review or cryptographic approval for scripts.
  7. Compute hashes after validation and verify them immediately before archive creation to reduce time-of-check/time-of-use substitution risks.
  8. Rename the current check to accurately describe its limited scope unless comprehensive package validation is implemented.
  9. Add regression tests that place test credentials and unauthorized scripts in nested directories and verify that packaging is rejected.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个面向用户对话的“自我检查与纠错”技能触发逻辑,但提供的代码并不处理用户输入、意图重分析、错误纠正或任何对话触发条件。相反,它是一个离线构建/发布工具,用于将技能目录打包成 .skill 文件,并执行本地验证。这属于 materially different primary purpose,并且包含多项未声明的文件读写、压缩打包和执行本地脚本能力。因此描述与实际行为明显不符。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个会在对话中根据用户纠正意见重新理解意图的对话型技能;而代码完全没有处理用户输入、对话上下文、纠错逻辑或意图重分析。相反,它是一个离线/本地的技能校验工具,面向技能包文件进行格式、安全和命名检查。这不仅主用途不同,而且实际具备文件读取、结构校验和敏感信息扫描等未声明能力。因此描述与代码行为存在明显且实质性的错配。

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [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 8)May include surrounding context.

md
---
AIGC:
    ContentProducer: Minimax Agent AI
    ContentPropagator: Minimax Agent AI
    Label: AIGC
    ProduceID: 7e99b26eee0fb672205dcd800a3b9801
    PropagateID: 7e99b26eee0fb672205dcd800a3b9801
    ReservedCode1: 3045022100950c99c5159e39f63b3de0ff4fe67a9216bee5d235e393964ecb75831d686f3402200da343d309a5a50fd3efc996bb26a673bcab7d68f337df46199aa5a0f7b5b74d
    ReservedCode2: 30450220128ca5a9df279cce64fce0ffd2c7c9dae2eae2b1ae63f3feb56b80e2784b239b022100b242ce3d92fae3eaa6d1fac261dd8fc33d39d3e8a9fdced6428c21b461a1e58d
description: 模型自我检查与纠错技能。当用户表达反对意见或指出错误时触发,如"不对"、"你回答错了"、"不是这样"、"重新理解"、"等等"、"我说的不是这个意思"等表达。用于重新分析和优化用户原始意图,而非修改上一轮回

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger design is overly broad for a high-frequency conversational skill: generic phrases like '不是', '等等', and similar negation markers can occur in ordinary dialogue unrelated to correction. This can cause unintended activation, leading the agent to override normal instruction flow, reinterpret user intent incorrectly, and produce unstable or manipulated responses.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Single-word triggers such as '停' or repeated variants of '等等' are especially ambiguous and easy to hit in benign conversation. In agent settings, broad low-specificity triggers can be abused by prompt authors to force the skill into a different reasoning mode, creating prompt-routing confusion and reducing predictability.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Broad content words like '还有' and '但是' are normal discourse connectors rather than reliable correction signals. Their inclusion makes the activation boundary unclear, increasing the chance that unrelated follow-up questions or additions are misclassified as correction events and altering agent behavior unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description is written entirely in Chinese and specifies the skill behavior only in that language, with no indication that users may choose another language or locale. This can violate language/locale policy when a skill implicitly constrains interaction to a specific language without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language docstrings and user-visible print strings in Chinese, starting with the module docstring and continuing through function descriptions and console output. The policy allows locale constraints only when users are given a choice or when the restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The validation logic requires the name field to match ^[a-z0-9-]+$ and explicitly states it must be English-only, which imposes a language policy on skill authors. This is a natural-language policy concern because the file does not provide opt-in, alternatives, or a documented regional/compliance justification for restricting names to English characters.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script rejects directory names unless they match an ASCII lowercase pattern and states they must be English lowercase. That is a locale/language restriction applied universally, and the file does not explain why non-English or non-ASCII names are disallowed.

Content

No source excerpt is available for this finding.