Back to skill

Security audit

Auto Improve

Security checks for vulnerabilities and agentic risk

Overview

This skill is a self-improvement workflow, but it gives the agent broad authority to automatically rewrite persistent instructions and memory without clear user approval.

Install only if you intentionally want an agent to maintain its own long-term instructions, and prefer using it in a controlled workspace where every proposed change is reviewed before it can alter skills, AGENTS.md, SOUL.md, or memory files.

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

Error
Location
SKILL.md:3
Finding
Autonomous Poisoning of Persistent Agent Instructions and Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 3–26 **Vulnerability Type**: Autonomous modification of persistent Agent instructions and memory **Risk Level**: High **Classification**: T02: Agent Memory Poisoning, T01: Skill Instruction Hijacking ### Vulnerable Code ```markdown description: Self-improvement loop that reads learnings, errors, and memory — detects patterns — and updates skills/protocols automatically. Use when the agent should get smarter without being prompted. --- # Auto-Improve ## Loop SCAN → PROPOSE → APPLY ## Scan Read `.learnings/ERRORS.md`, `.learnings/LEARNINGS.md`, relevant memory files. ## Look For Repeated errors, repeated user corrections, stale facts, valuable unused wins. ## Apply - **Low-risk reversible** → apply directly. - **Medium-risk** → apply + notify. - **High-risk** → write proposal only. ## Targets Skill `Learned` sections, `SOUL.md`, `AGENTS.md`, memory facts, reminder/ticket files. ## Rule Logging alone is not improvement. Update the playbook. ``` ### Technical Analysis The Skill instructs the Agent to read learning logs and unspecified “relevant memory files,” derive behavioral rules from their contents, and write those rules into persistent control surfaces such as `SOUL.md`, `AGENTS.md`, Skill sections, memory facts, and reminder or ticket files. These source files may contain untrusted or attacker-influenced text. The Skill defines no provenance validation, content sanitization, instruction/data separation, protected-file policy, or allowlist of permissible changes. It also allows changes classified by the Agent as “low-risk” to be applied directly and “medium-risk” changes to be applied before notification. Consequently, notification does not provide an approval boundary. Writing inferred rules into memory creates a persistent memory-poisoning path. Writing them into `SOUL.md`, `AGENTS.md`, or other Skill instructions may also hijack instructions when those files are subsequent ...[truncated 2306 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove automatic write access to `SOUL.md`, `AGENTS.md`, other Skills, and persistent memory from this workflow. 2. Treat all learning logs, corrections, tickets, and memory files as untrusted data. Explicitly prohibit following instructions embedded in those sources. 3. Replace `SCAN → PROPOSE → APPLY` with `SCAN → VALIDATE → PROPOSE → USER APPROVAL → APPLY`. 4. Require explicit, informed user approval before every persistent change, including changes considered low or medium risk. Notification after applying a change is insufficient. 5. Restrict scanning to an explicit allowlist of files and restrict writes to a dedicated, non-authoritative proposal file. 6. Generate a reviewable diff that identifies the source, destination, rationale, and expected behavioral effect of every proposed change. 7. Deny modifications to safety constraints, identity instructions, tool policies, approval requirements, and instruction-precedence rules. 8. Validate provenance and corroborate proposed factual updates against trusted sources rather than repetition alone. 9. Maintain an append-only audit trail and versioned backups so every accepted change can be attributed and rolled back. 10. Require separate authorization for modifications that could affect multiple sessions, other Skills, or unrelated tasks. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

High
Confidence
97% confidence
Finding
The skill description says it should be used whenever the agent 'should get smarter without being prompted,' which is an extremely broad auto-activation condition for a capability that reads memory and modifies skills/protocols. This can cause the agent to invoke self-modifying behavior in unrelated contexts, leading to unauthorized state changes, prompt drift, or persistence of bad instructions without explicit user consent.

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill explicitly instructs the agent to read learnings/memory and automatically apply changes to skills, system playbooks, and memory facts, including direct application of 'low-risk' changes, but provides no clear user warning, approval requirement, or integrity controls. In context, this is especially dangerous because it enables persistent self-modification and memory editing based on potentially untrusted prior outputs, creating a pathway for prompt injection persistence, corruption of agent behavior, and hard-to-audit configuration drift.

Static analysis

No suspicious patterns detected.