Back to skill

Security audit

self-evolving-skills

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed skill-building guide, but it directs agents to persistently modify skill instructions without enough user review controls.

Review before installing if you do not want an agent to create or modify reusable skills. If installed, require the agent to show the target path and exact diff before any skill file is created or updated, and avoid allowing automatic changes to existing skills or scripts without explicit approval.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:327
Finding

Persistent Skill Modification Without Explicit User Approval or Security Review

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:327-334
Corroborating Location: references/decision-flow.md:262-266
Vulnerability Type: Persistent procedural-memory poisoning
Risk Level: Medium

Vulnerable Code Segment

The complete affected segment from SKILL.md:327-334, rendered in English, states:

markdown
### When Issues Are Discovered During Use → Update Immediately

If a Skill is loaded and used, but the following is discovered:
- Missing steps
- Outdated commands
- An undocumented pitfall is encountered

**Before completing the task, use file-editing tools to update the Skill.**

The same requirement is reinforced in references/decision-flow.md:262-266:

markdown
When any of the following conditions are discovered while using a Skill,
use file-editing tools to update it before completing the task:

| Discovery | Action |
| Missing steps | Add the missing steps using file-editing tools |
| Outdated command | Update the command using file-editing tools |
| New pitfall | Add it to the Pitfalls section using file-editing tools |
| Better method | Rewrite the relevant section using file-editing tools |
| Dependency change | Update the Prerequisites section using file-editing tools |

Technical Analysis

The Skill requires an agent to modify persistent Skill instructions whenever it observes a missing step, outdated command, new pitfall, or purportedly better method. Unlike the initial Skill-creation workflow, this update path does not require renewed user authorization, review of the exact changes, validation of the source of the new information, or a security assessment.

Information observed during a task can originate from untrusted user input, repository content, command output, retrieved documentation, or error messages. An attacker can therefore present malicious instructions as a necessary fix or improved workflow. Following the documented update r ...[truncated 2288 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit user approval before every persistent Skill creation or update, including changes described as fixes or maintenance.
  2. Present the destination path and exact proposed diff before writing any persistent file.
  3. Treat user input, repository content, retrieved documents, tool output, and error messages as untrusted sources that must not be converted directly into durable instructions.
  4. Write proposed updates to a non-loaded staging directory and promote them only after approval.
  5. Prohibit automatic persistence of credentials, environment values, personal data, external instructions, encoded payloads, and executable commands.
  6. Add semantic security checks for shell execution, network retrieval, credential access, destructive file operations, privilege changes, startup persistence, and modifications outside the approved Skill directory.
  7. Require separate approval for additions or modifications under scripts/, because supporting files may contain executable code.
  8. Record the source, timestamp, authorizing user, and reviewed diff for each update, and provide a rollback mechanism.
  9. Replace the unconditional update requirement with guidance to report the issue and propose a patch without modifying persistent state automatically.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的核心能力是“自我进化/持续学习”,即把成功复杂任务转化为可复用技能,偏向知识沉淀或自动生成/积累机制。而提供的代码并未实现任何学习、总结、生成技能或任务沉淀逻辑;它只是一个静态验证器,针对已有 SKILL.md 文件做格式和规范检查。虽然它与 Skill 生态相关,但主要目的与声明明显不同,属于材料性功能不一致。代码也没有体现与‘自我进化机制’相关的触发器或权限需求。

Content

No source excerpt is available for this finding.

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 · references/skill-format.md (reported line 62)May include surrounding context.

md
required_credential_files:          # 需要的凭证文件(相对于配置目录)
  - path: google_token.json
    description: Google OAuth2 token
  - path: client_secret.json
    description: OAuth2 client credentials

# ═══════════════════════════════════════════════════════════════════

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/skill-format.md (reported line 100)May include surrounding context.

  • key: my.setting.path # 配置键(dotpath 格式) description: "What this controls" default: "~/default/path" # 默认值 prompt: "Display prompt" # 设置时的提示文本

text

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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

This markdown file is primarily instructional content, and the description and core guidance are written in Chinese with some English headings mixed in. Under the policy rule, forcing or assuming a specific language without opt-in is a natural-language policy concern when no alternative language choice or locale selection is offered.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document instructs the agent to create directories, write files, and overwrite or edit existing files using generic file-operation tools, but it does not require confirmation gates, scope restrictions, backups, or warnings about destructive effects. In a self-evolving skill, this is more dangerous than ordinary documentation because the guidance can directly influence autonomous persistence and modification of the agent's skill store, creating a path for unintended data loss, unsafe overwrites, or persistence of bad instructions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document is entirely written in Chinese and presents itself as the complete reference format for SKILL.md, but it does not offer a language choice or explain that it is intended only for a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The template’s instructional text and placeholders are written in Chinese throughout, which effectively imposes a specific language on skill authors and downstream users. There is no indication that Chinese is optional, user-selected, or justified as a region-specific template, so this creates a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file presents all operational guidance in Chinese and does not indicate that language selection is optional or region-specific. Under the language/locale policy criterion, forcing a single language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file contains user-facing docstrings and CLI output in Chinese, indicating the tool is designed to communicate in a specific language by default. Under the policy, forcing a language or locale without offering user choice or documenting a justified locale restriction is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.