Back to skill

Security audit

Self Improving Agent 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent self-improvement logger, but it can automatically persist conversation and error details into project memory without consent, validation, or redaction safeguards.

Install only if you are comfortable with the agent creating persistent learning files in projects. Before use, require confirmation for writes, keep .learnings local unless intentionally shared, redact secrets and personal data, and review any proposed CLAUDE.md or AGENTS.md change as a diff before accepting it.

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

Untrusted Conversation Content Can Poison Persistent Agent Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 16, 128–155, 211–217, 260–267, and 305
Vulnerability Type: Persistent agent memory poisoning
Risk Level: High

Vulnerable Code Snippets

markdown
| Broadly applicable learning | Promote to `CLAUDE.md` and/or `AGENTS.md` |
markdown
## Promoting to Project Memory

When a learning is broadly applicable (not a one-off fix), promote it to permanent project memory.

### When to Promote

- Learning applies across multiple files/features
- Knowledge any contributor (human or AI) should know
- Prevents recurring mistakes
- Documents project-specific conventions

### Promotion Targets

| Target | What Belongs There |
|--------|-------------------|
| `CLAUDE.md` | Project facts, conventions, gotchas for all Claude interactions |
| `AGENTS.md` | Agent-specific workflows, tool usage patterns, automation rules |

### How to Promote

1. **Distill** the learning into a concise rule or fact
2. **Add** to appropriate section in target file
3. **Update** original entry:
   - Change `**Status**: pending` → `**Status**: promoted`
   - Add `**Promoted**: CLAUDE.md` or `**Promoted**: AGENTS.md`
markdown
## Detection Triggers

Automatically log when you notice:

**Corrections** (→ learning with `correction` category):
- "No, that's not right..."
- "Actually, it should be..."
- "You're wrong about..."
- "That's outdated..."
markdown
7. **Promote aggressively** - if in doubt, add to CLAUDE.md

Technical Analysis

The skill treats conversation-derived corrections, knowledge claims, and operational guidance as candidate learning material. It then instructs the agent to promote sufficiently broad material into CLAUDE.md or AGENTS.md, which are persistent instruction files commonly consumed by future agent sessions.

No trust-boundary validation, provenance enforcement, content sanitization, instru ...[truncated 2307 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prohibit automatic promotion

    • Do not automatically write conversation-derived content to CLAUDE.md, AGENTS.md, or other persistent instruction files.
    • Replace “promote aggressively” with a deny-by-default policy.
  2. Require explicit human approval

    • Present the exact proposed entry and destination file to an authorized user.
    • Require explicit confirmation before modifying persistent memory.
    • Record who approved the change and when.
  3. Separate observations from trusted instructions

    • Store unverified learnings in a non-executable review queue.
    • Clearly label their source, trust level, and verification status.
    • Prevent future agents from treating pending observations as authoritative instructions.
  4. Apply strict content validation

    • Permit only declarative, project-specific facts through a constrained schema.
    • Reject shell commands, executable workflows, credential requests, external URLs, encoded content, and instructions that alter security controls.
    • Treat all user-supplied corrections as untrusted until independently verified against repository files or authoritative documentation.
  5. Preserve provenance

    • Retain the original source and context for every proposed memory entry.
    • Do not transform attacker-controlled content into an unattributed project rule.
  6. Constrain file writes

    • Use an allowlist for ordinary learning-log files.
    • Block writes to agent instruction files unless an explicit reviewed promotion mode is enabled.
    • Review proposed changes as a diff before applying them.
  7. Add poisoning detection

    • Flag entries that request command execution, data disclosure, permission changes, remote downloads, safety bypasses, or modifications to agent behavior.
    • Periodically audit persistent instruction files for untrusted or unexplained additions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill's activation criteria are very broad and map to common conversational events like corrections, requests, and failures. That makes unintended invocation plausible, which can trigger unnecessary file writes and retention of user content without a clear, narrow user intent to persist that data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs the agent to log corrections, requests, and command context into project files, but it provides no safeguards against recording secrets, personal data, credentials, tokens, internal prompts, or confidential business context. Because these notes may be kept in-repo or promoted into shared memory files, sensitive information can be persistently exposed beyond the original conversation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The error template explicitly requests raw error output, input parameters, and environment details, which commonly contain API keys, access tokens, file paths, hostnames, stack traces, and user-provided secrets. Persisting that material to markdown files creates a durable leakage channel and can spread secrets into version control or shared agent memory.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The automatic logging triggers instruct the agent to persist user-provided content and operational context whenever common patterns are noticed, without requiring consent or sensitivity checks. This turns routine interaction into passive data collection and increases the chance that private or confidential material is retained in project files unexpectedly.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Storing raw error output and input parameters in retained notes is dangerous because operational failures often surface secrets and privileged context that were never meant for long-term storage. Once written to markdown, that data may be indexed, synced, committed, or promoted into broader memory artifacts, amplifying exposure.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The learning and feature templates encourage retaining full context and user needs in persistent files, which can capture private conversation details, confidential project plans, or other sensitive material unrelated to the actual improvement needed. Because the files may be shared or promoted, seemingly harmless notes can become a secondary disclosure channel.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.