Back to skill

Security audit

Self-Learn

Security checks for vulnerabilities and agentic risk

Overview

This skill is transparent about learning from corrections, but it automatically stores broad task and user-correction history in persistent memory without clear consent or deletion controls.

Review this skill before installing if you do not want an agent to retain corrections or task lessons automatically. It should be used only in an environment where persistent memory is expected, and users should have a clear way to review, edit, and delete stored entries.

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:35
Finding
Untrusted User Corrections Are Written to Persistent Agent Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 35–49 and 72–74 **Vulnerability Type**: Persistent agent memory poisoning **Risk Level**: Medium ### Vulnerable Code ```markdown ## On User Corrections Trigger phrases (detect these): - "No, that's wrong / not right" - "Actually..." / "I prefer..." / "Remember that I..." - "Stop doing X" / "Why do you keep..." - "I told you before..." / "Always do X" When triggered: 1. Acknowledge the correction briefly 2. Append to `memory/corrections.md` under `## Corrections` with today's date 3. Call `memory_store` with: - category: `preference` (style/tone) or `decision` (behaviour/approach) - importance: 0.85 - text: `[CORRECTION] <what was wrong> → <correct behaviour>` + keywords 4. Recall to verify it stored correctly ``` ```markdown - **No secrets** — never log credentials, personal data, or sensitive info - **Corrections always log** — user corrections are always worth storing (importance ≥ 0.85) ``` ### Technical Analysis The Skill treats correction-like user input as trusted learning material and automatically writes it to two persistent locations: `memory/corrections.md` and the LanceDB-backed memory store. The stored record is assigned a relatively high importance of `0.85` and is immediately recalled for verification. No approval step, trust boundary, normalization process, provenance tracking, session scope, expiration policy, or validation against instruction-like content is specified. Consequently, an attacker can phrase a malicious behavioral directive as a correction, causing attacker-controlled rules to survive beyond the current interaction and potentially influence future sessions when memory is recalled. The unconditional requirement that corrections “always log” also conflicts with the separate prohibition on logging secrets and sensitive data. If a correction contains credentials, personal information, or other confidential content, the instructions do not define w ...[truncated 1722 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require explicit user confirmation before persisting any correction beyond the current session. 2. Store a normalized factual summary rather than copying arbitrary user text into memory. 3. Reject correction content containing executable directives, attempts to alter safety constraints, tool-use rules, trust decisions, or instructions affecting unrelated future tasks. 4. Apply secret and personal-data detection before both filesystem and database writes. Redact sensitive values or refuse persistence when safe normalization is not possible. 5. Define an explicit precedence rule stating that the prohibition on storing secrets overrides the requirement to log corrections. 6. Record provenance with every entry, including user identity or trust domain, session identifier, timestamp, source message, and whether persistence was explicitly approved. 7. Scope preferences to the relevant user, workspace, and task category instead of applying them globally. 8. Treat recalled memories as untrusted contextual data rather than authoritative instructions. Recalled content must never override system policies, safety controls, or current user intent. 9. Add expiration, review, editing, and deletion controls for persistent records. 10. Avoid assigning high importance automatically. Importance should depend on confirmation, repetition, trusted provenance, and validation. 11. When showing learned patterns, redact sensitive data and restrict results to records authorized for the requesting user. 12. Add adversarial tests covering correction phrases that contain prompt injection, credentials, cross-session directives, and requests to weaken safety controls. ]]>
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 is designed to auto-activate on extremely broad triggers, including ordinary correction phrases and after completing any task. That creates a persistent surveillance-like behavior where routine interactions are turned into stored memory without a narrowly scoped user action, increasing the chance of unintended data retention, preference poisoning, and privacy violations.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill directs automatic writes to both a file and a memory store during self-evaluation, but does not require a visible notice or consent flow before persistence. Even with a 'No secrets' rule, the model may misclassify sensitive content, causing private or contextual user data to be retained unexpectedly across sessions.

Static analysis

No suspicious patterns detected.