Back to skill

Security audit

🔄 Self-Iteration Engine

Security checks for vulnerabilities and agentic risk

Overview

The skill is openly about self-improvement, but it gives itself broad persistent logging and skill-modification authority without clear user approval, privacy limits, or containment.

Install only if you are comfortable with a shared component that records interaction summaries and can influence or modify future skill behavior. Before use, require explicit human approval for any SKILL.md edits or new skill creation, restrict logging to sanitized summaries, define retention and deletion rules, and limit cross-skill access to an allowlist.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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

Error
Location
SKILL.md:43
Finding
Persistent Agent Behavior Modification Through Untrusted Interaction Data<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 43–54, with the behavior-update trigger at line 88 **Vulnerability Type**: T02: Agent Memory Poisoning **Risk Level**: High ### Vulnerable Code Snippet ```markdown File location: `memory/usage-logs/<skill-name>.md` ## Self-Iteration Triggers Evaluate these conditions during each **periodic review** (default daily, configurable): | Condition | Action | |-----------|--------| | 3+ consecutive successful invocations | Mark skill as "stable" — reduce context allocation | | 2+ failures for the same scenario | Flag for SKILL.md reassessment | | Same request type appears 3+ times | Evaluate creating a new dedicated skill | | User corrected output | Log correction, adjust future behavior for that scenario | ``` The resulting state is later allowed to trigger autonomous modification: ```markdown - If any trigger fires → update SKILL.md or create new skill ``` ### Technical Analysis The Skill instructs the Agent to persist summaries of requests and user corrections in long-term usage logs. Those records are subsequently treated as trusted evidence for changing future behavior, updating `SKILL.md`, or proposing new Skills. User corrections and repeated request patterns are attacker-influenced input. The documented workflow does not define: - Validation or sanitization of correction content - Separation between untrusted observations and trusted behavioral rules - Restrictions against recording executable or policy-changing instructions - Human approval before modifying Skill instructions - Provenance, integrity checks, or immutable audit history - Rollback procedures for poisoned updates Consequently, repeated attacker-controlled interactions can be converted into durable Agent state and eventually into persistent Skill instructions. ### Attack Path 1. An attacker repeatedly submits a crafted request pattern or claims that the Agent's safe response is incorrect. 2. The Agent records the r ...[truncated 1185 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat every usage log entry and user correction as untrusted data. 2. Store structured facts and bounded summaries rather than raw user instructions. 3. Reject entries containing executable commands, policy overrides, credential material, or instructions to weaken safety controls. 4. Separate observation records from trusted configuration and behavioral rules. 5. Replace automatic updates with read-only change proposals and explicit diffs. 6. Require authenticated human approval before modifying `SKILL.md`, changing persistent behavior, or creating a new Skill. 7. Require corroboration from independent, trusted evidence rather than using repetition alone as proof. 8. Record provenance, author, timestamp, review decision, and integrity metadata for every persisted entry. 9. Maintain versioned backups and a tested rollback process for all Skill modifications. 10. Apply schema validation and content-length limits to usage logs and feedback-loop files. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:88
Finding
Overbroad Cross-Skill Review and Autonomous Modification Authority<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 88–92 and 142 **Vulnerability Type**: T05: Unauthorized Access and Privilege Escalation **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown - If any trigger fires → update SKILL.md or create new skill - Archive usage logs older than 7 days ### Monthly (deep) - Full performance review across all skills ``` The document further expands the scope to dependent Skills: ```markdown When this skill updates log format, check ALL dependent skills' parsing logic. ``` ### Technical Analysis The Skill is presented as a shared feedback and logging component, but its instructions grant it broad authority to review all Skills, update `SKILL.md`, create new Skills, and inspect dependent Skills' parsing logic. This violates least-privilege design because the component's legitimate logging and analysis responsibilities do not inherently require unrestricted write access to Skill definitions or broad access across unrelated Skills. No allowlist, ownership check, per-Skill authorization model, read-only mode, or approval boundary is specified. When combined with attacker-influenced usage logs, the excessive authority creates a privilege-amplification path: influence over one Skill's records can trigger review or mutation operations affecting a broader set of Skills. ### Attack Path 1. An attacker influences the usage log or feedback-loop state associated with one Skill. 2. The manipulated records satisfy a failure, correction, or repeated-pattern threshold. 3. The self-iteration engine initiates a review with authority extending beyond the originating Skill. 4. The engine reviews dependent or unrelated Skills and may update `SKILL.md` or create a new Skill. 5. Unsafe guidance or incompatible format changes propagate into other components. 6. Future invocations of the affected Skills operate using the unauthorized changes. ### Impact Assessment The documented authority can expand the effe ...[truncated 656 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Restrict the engine to logs and state files belonging to the explicitly invoking Skill. 2. Introduce a per-Skill allowlist defining readable and writable paths. 3. Make cross-Skill reviews read-only by default. 4. Replace direct mutation with signed or reviewable change proposals. 5. Require the owner of each affected Skill to approve modifications. 6. Prohibit creation of new Skills without explicit human authorization. 7. Use separate permissions for log writing, log reading, Skill analysis, and Skill modification. 8. Validate dependency relationships before accessing another Skill. 9. Test proposed changes in an isolated environment before deployment. 10. Record every cross-Skill access and modification in an immutable audit log. 11. Abort updates when the originating evidence contains untrusted instructions or lacks verifiable provenance. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Vague Triggers

High
Confidence
96% confidence
Finding
The trigger phrases include very broad language such as 'learn from this' and 'improve yourself', which can be invoked during ordinary conversation rather than explicit administrative intent. In a shared self-improvement skill, accidental activation can cause unnecessary logging, behavior changes, or downstream update actions across dependent skills.

Self-Modification

High
Category
Rogue Agent
Content
### Weekly (moderate) 
- Aggregate performance stats
- Check iteration triggers (listed above)
- If any trigger fires → update SKILL.md or create new skill
- Archive usage logs older than 7 days

### Monthly (deep)
Confidence
99% confidence
Finding
The skill explicitly authorizes updating SKILL.md or creating new skills when heuristic triggers fire, which is a self-modification pathway. In a shared component used by other skills, this can propagate instruction drift, poison dependent workflows, or let adversarial interactions influence future behavior if updates are not strongly gated.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill instructs persistent collection of request descriptions, outcomes, correction details, and lessons without any privacy minimization, consent, or handling limits. That creates a durable record of user-provided content that may include sensitive data and can later be reused outside the original interaction context.

Ssd 3

Medium
Confidence
98% confidence
Finding
Per-skill usage logs and correction records create a memory channel that persists and reuses user-provided information across future interactions. Because the format invites free-text request and correction details, it can capture sensitive content, prompt material, or identifiers that were never intended for long-term storage.

Ssd 3

Medium
Confidence
95% confidence
Finding
Cross-user pattern tracking for skill creation encourages aggregation of requests across different users, which broadens the scope of retained data beyond a single session or user. This can expose trends, preserve sensitive topics, and normalize reuse of user inputs for secondary purposes without clear safeguards.

Missing User Warnings

Low
Confidence
85% confidence
Finding
The archiving instruction expands the retention lifecycle of operational logs but gives no policy for minimization, expiry, or secure handling. Even short-term archives can preserve sensitive interaction history longer than intended and make later misuse or unintended exposure easier.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The file includes a full Chinese-language instruction section in addition to English, but it does not state whether language should be selected based on user preference or locale. This can create ambiguity around language behavior and may violate a policy requiring opt-in or explicit language choice.

Static analysis

No suspicious patterns detected.