Back to skill

Security audit

Self Improving

Security checks for vulnerabilities and agentic risk

Overview

This skill is a Review item because it creates persistent agent memory and workspace steering while its stated file boundaries are inconsistent.

Install only if you want an agent to keep long-term local notes about your corrections and preferences. Review memory entries before they become global rules, avoid storing sensitive personal or work information, and do not allow changes to AGENTS, SOUL, HEARTBEAT.md, or heartbeat rules unless you explicitly want persistent workspace-level steering.

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

Persistent Agent Steering Through Automatically Promoted Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:46-55, 84-105, 202-217, 241-246, 260-268
Vulnerability Type: Persistent agent memory poisoning
Risk Level: High

Vulnerable Code Snippet

markdown
Memory lives in `~/self-improving/` with tiered structure. If `~/self-improving/` does not exist, run `setup.md`.
Workspace setup should add the standard self-improving steering to the workspace AGENTS, SOUL, and `HEARTBEAT.md` files, with recurring maintenance routed through `heartbeat-rules.md`.

```text
~/self-improving/
├── memory.md          # HOT: ≤100 lines, always loaded
├── index.md           # Topic index with line counts
├── heartbeat-state.md # Heartbeat state: last run, reviewed change, action notes
├── projects/          # Per-project learnings
├── domains/           # Domain-specific (code, writing, comms)
├── archive/           # COLD: decayed patterns
└── corrections.md     # Last 50 corrections log

Log automatically when you notice these patterns:

Preference signals → add to memory.md if explicit:

  • "I like when you..."
  • "Always do X for me"
  • "Never do Y"
  • "My style is..."
  • "For [project], use..."

3. Automatic Promotion/Demotion

  • Pattern used 3x in 7 days → promote to HOT
  • Pattern unused 30 days → demote to WARM
  • Pattern unused 90 days → archive to COLD
  • Never delete without asking

7. Transparency

  • Every action from memory → cite source: "Using X (from projects/foo.md:12)"
  • Weekly digest available: patterns learned, demoted, archived
  • Full export on demand: all files as ZIP

This skill ONLY:

  • Learns from user corrections and self-reflection
  • Stores preferences in local files (~/self-improving/)
  • Maintains heartbeat state in ~/self-improving/heartbeat-state.md when the workspace integrates heartbeat
  • Reads its own memory files on activation
text

### Technical Analysis

The skill treats user-supplied natural-language preferences and corrections as persistent behavioral rules. It automatic
...[truncated 2826 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not modify AGENTS, SOUL, HEARTBEAT.md, or other agent-control files as part of memory setup. Keep the feature isolated to an explicitly authorized, project-scoped data directory.
  2. Store preferences as inert structured data with a restrictive schema, such as a category, normalized value, provenance, scope, creation time, and expiration time. Never execute or directly interpolate stored free-form text as agent instructions.
  3. Require explicit user confirmation before every promotion to HOT memory. Display the exact proposed rule, destination, scope, and expected behavioral effect.
  4. Replace repetition-based trust with authorization and safety validation. Repeating a statement must not bypass policy checks.
  5. Reject memory entries that request tool execution, policy changes, secret disclosure, safety-check bypasses, role changes, or access beyond the stated task.
  6. Bind memory to a verified user and project. Prevent one user, repository, or untrusted document from creating rules that affect another scope.
  7. Apply stored preferences only through a precedence layer subordinate to system, developer, security, and current-task instructions.
  8. Add provenance, audit history, expiration, review, and one-step deletion controls. Provide a safe mode that disables persistent loading.
  9. Make setup and maintenance files part of the reviewed package. Do not instruct the agent to run absent setup.md, boundaries.md, or heartbeat-rules.md resources.
  10. Add tests proving that instruction-like preference text remains inert and cannot trigger execution, weaken safeguards, or propagate into workspace steering files.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

A substantial portion of the manifest description, including capability and trigger documentation, is presented in Chinese with no indication that the user can choose another language. This can violate language/locale policy expectations when a skill imposes a specific language without opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation list includes "self" alongside other keywords. "self" is a very common term that can appear in many unrelated contexts, making the trigger scope overly broad and increasing the risk of unintended invocation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation flow says to run setup.md if the memory directory does not exist, but the skill later says it never reads files outside ~/self-improving/. That contradiction creates an implicit exception path where the agent may access additional files or instructions not covered by the advertised boundary.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill claims it never reads files outside ~/self-improving/, yet it instructs integration with workspace files like AGENTS, SOUL, and HEARTBEAT.md. This mismatch weakens user trust and can normalize broader file access than the stated security boundary, increasing the chance of unintended workspace data exposure.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
78% confidence
Finding

The skill authorizes autonomous promotion, demotion, and archival of learned patterns based on internal heuristics without requiring user review for those changes. In a memory-management skill with exec capability and persistent storage, this can silently reshape agent behavior over time, entrench mistaken preferences, or preserve sensitive information longer than the user expects.

Content

Scanner excerpt · SKILL.md (reported line 217)May include surrounding context.

md
* Pattern used 3x in 7 days → promote to HOT
* Pattern unused 30 days → demote to WARM
* Pattern unused 90 days → archive to COLD
* Never delete without asking

### 4. Namespace Isolation

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The stated scope emphasizes learning from corrections, storing preferences in local files, and maintaining heartbeat state under ~/self-improving/. The documented action Export memory | ZIP all files adds archival/packaging behavior that is not reflected in the core manifest description of self-reflection, self-learning, and self-organizing memory.

Content

No source excerpt is available for this finding.