Back to skill

Security audit

meta-metacognitive-monitoring

Security checks for vulnerabilities and agentic risk

Overview

The skill is not malicious, but it asks agents to persist and automatically reuse learned preferences and even rewrite its own skill instructions without clear user control.

Review this skill before installing. It should not be allowed to rewrite its own SKILL.md or automatically apply stored preferences across sessions unless you explicitly want that behavior and have a way to inspect, approve, and clear the learned state. Avoid storing sensitive prompts, credentials, or private workflow details in its notes.

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:51
Finding

Unvalidated Persistent Preference and Instruction Poisoning

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 51-72
Vulnerability Type: Persistent memory poisoning through unvalidated preferences and self-modifying instructions
Risk Level: Medium

Vulnerable Code Snippet

The following is an English translation of the relevant instructions:

markdown
### Memory File
`learned_patterns.json` records operation totals, decision-category frequency,
overconfidence calibration alerts, user preferences, and improvement suggestions.

### Invoke After Use

# Record a user preference and adopt it directly next time
python scripts/learner.py prefer <skill-directory> --key degradation-strategy --val conservative-validation

### Iteration Rules
- Overconfidence alerts accumulated at least 3 times:
  proactively lower the SEEK_HELP threshold for the corresponding domain
  and write it back to this SKILL.md.
- Important user preferences:
  write them to learned_patterns.json and adopt them directly on the next invocation.

Technical Analysis

The skill directs the agent to persist user-provided preferences in learned_patterns.json and automatically apply them during later invocations. It does not define validation, an allowlist of permitted preference values, provenance tracking, user or task isolation, expiration, or confirmation before a stored preference is reused.

The iteration rules also direct the agent to modify SKILL.md. This is more sensitive than recording telemetry because content written into the skill definition may subsequently be treated as authoritative agent instructions whenever the skill is loaded. Consequently, attacker-controlled or otherwise untrusted learned content could cross the boundary from data into persistent instructions.

The bundled scripts/learner.py currently stores arbitrary note strings but does not itself interpret them as executable commands or implement the documented prefer interface. Therefore, this f ...[truncated 1577 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat all learned preferences, notes, and improvement suggestions as untrusted data rather than agent instructions.
  2. Replace arbitrary strings with a strict schema containing typed fields and narrowly allowlisted values.
  3. Bind each record to its originating user, task, domain, and workspace so state cannot silently influence unrelated sessions.
  4. Store provenance, creation time, expiration time, and the identity or context that authorized each preference.
  5. Require explicit user confirmation before applying a persisted preference in a later session.
  6. Never automatically rewrite SKILL.md from runtime observations or user-controlled memory.
  7. Keep immutable skill instructions separate from learned telemetry and proposed configuration changes.
  8. If threshold adjustment is required, write a proposed change to a review queue and apply it only after validation against calibration data and explicit approval.
  9. Escape and length-limit free-form notes, and ensure they are never inserted into prompts or instruction files as trusted content.
  10. Implement the documented command interface consistently and add tests proving that stored data cannot modify instructions or cross user and task boundaries.
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 (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个复杂的元认知/编排/自进化技能,核心能力应包括分析、验证、反思、协调其他 agent 或技能,以及基于经验进行优化。实际代码只是在本地 JSON 文件中持久化保存调用次数、失败次数和备注,作用更像是为其他系统提供基础遥测/日志支持。虽然文件头注释提到“支撑 meta-evolver 闭环”,但这只是辅助记录,不等于实现了闭环进化本身。因此代码的主要用途与声明的主要能力存在明显且实质性的不一致。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill documents file-writing behavior via a learner that records decisions and preferences, but it declares no tool scope or permissions boundaries. That creates an authorization and transparency gap: an agent or user may invoke persistence-capable behavior without an explicit declaration of what files may be modified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The visible natural-language description and operational guidance are entirely in Chinese, with no indication that the user can choose another language or that the skill is intentionally region-specific. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

The document presents the skill as a harmless meta-layer switch while also describing persistent behavior changes, super-agent integration, and continuous self-evolution. This contradiction weakens operator understanding of the true statefulness and authority of the skill, increasing the risk of unsafe delegation and unnoticed behavioral drift.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs persistent storage of user preferences and interaction-derived data in learned_patterns.json but does not provide a clear warning, consent flow, retention policy, or minimization boundary. This can lead to unexpected collection of personal or sensitive workflow data and cross-session privacy leakage.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The memory design explicitly stores user preferences across sessions and allows arbitrary notes/errors without clear data minimization rules. Persistent, under-scoped memory can accumulate sensitive operational details, create profiling risks, and carry prompt-injected or unsafe preferences forward into future interactions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs users to '回写本 SKILL.md' as part of a self-evolution loop, meaning the skill definition can modify its own instructions over time. Self-modifying prompt artifacts are dangerous because they can bypass review, accumulate unsafe behavior, and enable instruction drift or prompt injection persistence across sessions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains user-facing natural language exclusively in Chinese, and there is no indication that the skill is region-specific or that users can opt into this locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring is written only in Chinese and presents the skill's purpose in that language without indicating any locale choice or opt-in. This can violate language/locale policy when a skill implicitly forces a specific language for users who may expect another language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script persists operational notes and counters to a local JSON file without any consent, disclosure, retention control, or restriction on what may be stored in note. If upstream callers pass sensitive prompts, user data, or secrets into note, this creates unintended persistent storage and possible later disclosure to other components or users on the same system.

Content

No source excerpt is available for this finding.