Back to skill

Security audit

self-play-coevolution

Security checks for vulnerabilities and agentic risk

Overview

The skill has a working self-play demo, but it also asks agents to persist user preferences and potentially rewrite the skill instructions, which needs human review before installation.

Install only if you are comfortable with a skill keeping local cross-session memory. Do not store secrets or sensitive personal details in its notes or preferences, and require human review before any suggested SKILL.md change is applied.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
scripts/learner.py:88
Finding

Persistent memory poisoning through unvalidated learning records

Content
View full analysis
= THRESHOLD_ERROR: suggestions.append( f"⚠️ 错误「{err}」已出现 {info['count']} 次,建议增加预检/兜底步骤," f"并将经验回写本技能 SKILL.md(lastNote: {info.get('lastNote','')})" ) ``` The associated Skill instructions state: ```markdown python scripts/learner.py prefer <本技能目录> --key 输出语言 --val 中文 python scripts/learner.py insight <本技能目录> python scripts/learner.py reflect <本技能目录> ``` ```markdown - **错误累计 ≥3 次** → 主动增加预检/兜底步骤,并将经验回写本 SKILL.md。 - **重要用户偏好** → 写入 `learned_patterns.json`,下次调用直接采用,减少重复询问。 ``` ### Technical Analysis The `prefer` command accepts arbitrary values through `--key` and `--val`, and `record` similarly accepts arbitrary capability names, error names, and notes. These values are persisted verbatim in `learned_patterns.json` without validation, normalization, trust labeling, or separation between passive data and behavioral instructions. The reflection mechanism subsequently embeds attacker-controlled error names and notes into generated recommendations. The accompanying Skill documentation directs agents to apply stored preferences during later uses and recommends writing accumulated experience back into `SKILL.md` after repeated errors. The code does not itself modify `SKILL.md`; however, the documented workflow creates a persistent poisoning path when an agent fol ...[truncated 1528 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/learner.py:64
Finding

Free-form user data is retained in plaintext without explicit access controls

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
  • 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 (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The manifest advertises a self-play/co-evolution optimization skill, but the documentation also introduces persistent telemetry, preference capture, and self-improvement behaviors unrelated to that purpose. This mismatch can mislead reviewers and users, causing them to authorize the skill under false assumptions while hidden stateful behaviors collect or modify data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Claiming the skill may rewrite its own SKILL.md introduces self-modifying behavior, which can alter future execution semantics, evade review expectations, or accumulate unsafe changes over time. In the context of an agent skill, self-modification is especially risky because it changes trusted instructions and capability boundaries after initial approval.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a self-play adversarial improvement loop where one agent alternates between proposer and critic to iteratively strengthen both proposal quality and critique ability. This module instead only records operation counts, errors, notes, and preferences into a JSON file and produces simple threshold-based suggestions; there is no proposer/critic loop, adversarial exchange, iterative model refinement, or GAN-style self-training anywhere in the code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented behavior materially diverges from the skill’s declared proposer/critic self-play purpose and instead introduces a generic persistent learning system. That mismatch is dangerous because it can smuggle in stateful data collection and file modification capabilities that users and reviewers would not expect from the advertised skill, reducing transparency and increasing the chance of unsafe operation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill documents file-writing behaviors (learned_patterns.json updates and potential SKILL.md rewrites) but declares no explicit tool scope or permissions boundary. That creates an authorization ambiguity where a consumer may invoke the skill expecting a reasoning-only workflow while it performs persistent local writes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented persistent learning-and-memory subsystem broadens the skill from transient reasoning into cross-session state retention and file modification. In a skill framed as self-play optimization, this expansion is dangerous because it introduces data retention and mutation capabilities that are not necessary for the advertised task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states it will automatically record usage outcomes and user preferences to local storage without a clear, explicit privacy warning or consent flow. Silent persistence can capture sensitive user-provided details and surprise users who reasonably expect ephemeral processing.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Persistent logging of user preferences, failures, notes, and usage details in natural-language form can easily retain sensitive or identifying information and expose it across future sessions. Because the storage is longitudinal and loosely structured, it also increases the chance of accidental prompt-context leakage or secondary use beyond the original interaction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Tracking user preferences and long-term usage is not justified by the stated self-play/co-evolution purpose, so it represents unnecessary collection of behavioral data. Unnecessary persistence increases privacy risk and creates opportunities for data leakage or unintended reuse across sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instructions say to write learned experience into SKILL.md and store preferences in learned_patterns.json without clearly warning about file modification side effects. Undisclosed mutation of local files can affect future behavior, leak prior users' information, and break operator expectations about immutability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This is a natural-language policy issue because the module docstring, usage text, and later CLI/help strings are presented only in Chinese, which imposes a specific language on users. The file does not indicate that the tool is region-specific or provide any option to select another language.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module records arbitrary user preferences, notes, capability usage, and error telemetry into a persistent JSON file for any supplied skill directory, even though that data collection is not justified by the stated self-play purpose. This creates unnecessary retention of potentially sensitive behavioral data and free-form notes, increasing privacy and data-minimization risk, especially because the note/preference fields can capture secrets or personal information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module's docstring and all user-facing usage/help text are written only in Chinese, with no indication that users may choose another language or locale. This creates a natural-language policy issue because the skill effectively mandates a specific language for interaction and documentation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The text states that the system automatically records usage history and user preferences in a local file, but provides no warning to the user about persistence, privacy implications, retention, or reuse. This creates an informed-consent problem and increases the risk that sensitive preferences or operational details are stored unexpectedly.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs persistent storage of user preferences, errors, and usage telemetry without showing why such retention is necessary for proposer/critic self-play. Unnecessary persistence expands the privacy and leakage surface, especially when data is reused automatically across future sessions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions explicitly say to record user preferences for direct reuse next time, creating persistent cross-session memory in natural language. That is risky because preferences may encode sensitive personal or behavioral information and can later be surfaced or misapplied outside the original context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The iteration rules direct the system to write learned behavior back into SKILL.md, effectively modifying the skill’s own instruction files. Self-modifying prompt assets are dangerous because they can introduce instruction drift, persistence of accidental or adversarial content, and make future behavior harder to audit and trust.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The iteration rule instructs writing important user preferences into a memory file for later automatic application, formalizing long-term retention and reuse. In this skill context, that behavior is not necessary for self-play coevolution and creates avoidable privacy, leakage, and context-confusion risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

Natural-language strings printed during self-test and default usage are user-facing and continue the same forced-locale behavior. Because no alternate locale or opt-in is offered, this conflicts with the requirement to avoid imposing a language without user choice.

Content

No source excerpt is available for this finding.