Back to skill

Security audit

💾 Complex Memory Manager

Security checks for vulnerabilities and agentic risk

Overview

This memory-management skill is mostly coherent, but it overstates its encryption and gives agents broad persistent-memory cleanup and deletion authority without enough user control.

Review this skill before installing if you rely on memory privacy or data retention. Treat Tier 2 entries as readable by anyone with file access, do not store secrets or personal data through it, and require manual approval or a dry run before cleanup deletes, merges, or archives memory.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:64
Finding
Predictable Repeating-Key XOR Misrepresented as Encryption## Vulnerability Details **File Location**: `SKILL.md`, lines 64–81 **Vulnerability Type**: Weak cryptography and predictable key derivation **Risk Level**: Medium ```python import hashlib, base64 def _derive_key(skill_name: str, year_month: str) -> str: """e.g., _derive_key('my-skill', '2026-05')""" raw = skill_name + year_month return hashlib.sha256(raw.encode()).hexdigest()[:8] def encrypt(text: str, skill_name: str, year_month: str) -> str: key = _derive_key(skill_name, year_month) result = bytes([ord(c) ^ ord(key[i % len(key)]) for i, c in enumerate(text)]) return base64.b64encode(result).decode() def decrypt(encoded: str, skill_name: str, year_month: str) -> str: key = _derive_key(skill_name, year_month) raw = base64.b64decode(encoded) return ''.join(chr(b ^ ord(key[i % len(key)])) for i, b in enumerate(raw)) ``` The same insecure design is duplicated in the translated section at `SKILL.md`, lines 189–205. ### Technical Analysis The Skill presents repeating-key XOR followed by Base64 encoding as encryption for persistent Tier 2 memory. The key is derived exclusively from the skill name and year-month value, both of which are predictable and documented in each memory entry through fields such as `source_skill`, `key_hint`, and creation dates. SHA-256 does not provide secrecy when all inputs are public, and truncating its hexadecimal output to eight characters further limits the key material. Repeating-key XOR is not secure encryption. Base64 only transforms binary data into printable text and provides no confidentiality. An attacker with read access to a Tier 2 memory file can reconstruct the key and reverse the transformation without obtaining any separate secret. The flagged decode-and-execute behavior is not present: `base64.b64decode` output is XOR-decoded and returned as text, not passed to `exec`, `eval`, a shell, or another execution mechanism. Likewise, no net ...[truncated 1613 chars]
Remediation
## Remediation Suggestions 1. Replace repeating-key XOR with authenticated encryption such as AES-256-GCM or ChaCha20-Poly1305. 2. Obtain a high-entropy encryption key from an operating-system keychain, dedicated secret manager, or securely provisioned environment secret. Do not derive encryption keys solely from public metadata. 3. Generate a unique cryptographically random nonce for every encrypted entry and store the nonce alongside the ciphertext. Never reuse a nonce with the same key. 4. Authenticate relevant metadata, including the memory tier, source skill, creation date, and expiration date, as associated data so that unauthorized modification can be detected. 5. Introduce a versioned ciphertext format that records the algorithm and key identifier, enabling safe key rotation and migration of existing entries. 6. Until secure encryption is implemented, describe the current mechanism as obfuscation rather than encryption and prohibit sensitive data from being stored through it. 7. Preserve the Tier 3 prohibition against storing credentials and PII, and add validation before persistence rather than relying only on periodic cleanup. 8. Apply the correction to both duplicated examples in `SKILL.md` to prevent dependent implementations from copying the insecure variant.
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

Medium
Confidence
96% confidence
Finding
The trigger list includes broad natural-language phrases such as "remember this" and an open-ended condition of "any skill that needs persistent cross-session memory," which can cause the skill to activate in many unintended contexts. Because this is a shared memory component with cross-session persistence, accidental invocation can lead to over-collection, retention, or storage of data that was not meant to be persisted, including sensitive context from other skills.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The cleanup protocol instructs the agent to move, delete, merge, and compact files on a periodic basis, but it does not require an explicit warning, confirmation, preview, or rollback mechanism before destructive operations. In a shared component used by multiple skills, unintended cleanup could silently delete or alter memory relied on by dependent skills, causing data loss, integrity issues, or privacy-relevant mistakes if entries are misclassified.

Static analysis

No suspicious patterns detected.