Back to skill

Security audit

Clear Mind

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent memory-cleanup tool, but it can rewrite and delete persistent memory containing sensitive details without sufficiently explicit backup and approval controls.

Review this skill carefully before installing. It does not show exfiltration, remote code, or deception, but users should only run it when they intentionally want long-term memory reorganized, and should require a verified backup plus explicit approval before any migration or deletion of portfolio, user directive, project, or incident records.

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

Sensitive Information Migrated to Predictable Plaintext Files Without Mandatory Pre-Migration Backup

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 93-115; related deletion and backup instructions at lines 50-53 and 175-179
Vulnerability Type: Plaintext sensitive-data storage and unsafe destructive migration
Risk Level: Medium

Vulnerable Code

markdown
Ensure `/memory/facts/` exists with these files:

memory/facts/ ├── critical-events.md # Important incidents and lessons ├── projects.md # Active project statuses ├── technical-setup.md # DEPRECATED — technical configs now stay in MEMORY.md ├── portfolio.md # Stocks, investments, strategies └── user-directives.md # User preferences and instructions

text

**Note**: `technical-setup.md` is kept for backward compatibility. New technical content goes to MEMORY.md.

### Phase 3: Migrate Content

Move factual details from MEMORY.md to appropriate facts/ files:

| Source Section      | Target File          | Migration Rule                                                                                |
|---------------------|----------------------|-----------------------------------------------------------------------------------------------|
| Critical Events     | critical-events.md   | Move full details, keep index link                                                            |
| Projects            | projects.md           | Move all project details                                                                      |
| Technical Setup     | technical-setup.md   | **KEEP in MEMORY.md** — agent capabilities stay; only move niche/deprecated configs if requested |
| Portfolio/Trading   | portfolio.md         | Move holdings, strategies                                                                     |
| User Directives     | user-directives.md   | Move preferences, quotes                                                                      |

Related destructive behavior:

markdown
### DELET
...[truncated 3923 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit, informed approval immediately before migrating each sensitive category, especially financial records, personal directives, and historical incidents.
  2. Create a versioned backup of MEMORY.md and the complete facts/ directory before every write, move, overwrite, or deletion operation.
  3. Validate the backup by checking readability, file counts, and cryptographic hashes before proceeding.
  4. Use an atomic migration transaction: write to a private temporary directory, validate content completeness, atomically rename files into place, and roll back automatically on any failure.
  5. Prohibit deletion during automatic maintenance. Present proposed deletions to the user and require explicit confirmation.
  6. Apply least-privilege file permissions to MEMORY.md, facts/, temporary files, and backups. Avoid shared or globally readable directories.
  7. Detect and redact secrets such as credentials, tokens, private keys, account identifiers, and authentication data rather than moving them into additional plaintext files.
  8. Minimize duplicated sensitive information and define retention periods for migrated records and backups.
  9. Perform post-migration integrity checks to verify that all retained content is represented exactly once and that core rules, capabilities, and user directives remain intact.
  10. Record an auditable migration manifest containing source section, destination, timestamp, checksum, and user authorization without logging the sensitive content itself.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation criteria include vague triggers like 'Memory cleanup is requested' and 'Periodic maintenance,' which can cause the skill to run without a clearly bounded need or scope. In a memory-management skill that rewrites and migrates user data, ambiguous invocation conditions increase the chance of unnecessary modification, over-collection, or accidental movement/deletion of important information.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
Move factual details from MEMORY.md to appropriate facts/ files:

| Source Section      | Target File          | Migration Rule                                                                                |
|---------------------|----------------------|-----------------------------------------------------------------------------------------------|
| Critical Events     | critical-events.md   | Move full details, keep index link                                                            |
| Projects            | projects.md          | Move all project details                                                                      |

Static analysis

No suspicious patterns detected.