T09 · Insecure Skill Coding Practices
- Location
SKILL.md:41- Finding
Unrestricted Memory Archiving and Automatic Retention-Based Deletion
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 41-46
Vulnerability Type: Unsafe handling and deletion of persistent Agent memory
Risk Level: MediumComplete Code Snippet:
json { "archiveDir": "memory/", "retentionDays": 30, "autoClean": true, "dailyBriefing": true }The documented features also state that the Skill archives memory files by date, supports inheritance of memory across sessions, and periodically deletes expired files.
Technical Analysis
The Skill is documentation-only and contains no executable implementation. Nevertheless, its documented configuration enables automatic cleanup by default and directs the Agent to process the entire
memory/directory. No safeguards are specified for:- Canonical-path validation or directory allowlisting
- Symbolic-link and path-traversal protection
- Detection and redaction of credentials or other sensitive records
- Encryption and restrictive permissions for generated archives
- Confirmation or preview before deletion
- Backups, recovery, or transactional deletion
- Access boundaries for search results and daily summaries
Agent memory may contain private conversation history, credentials, operational instructions, or other sensitive state. Consolidating those records into searchable archives and cross-session summaries increases their exposure. Automatic retention-based cleanup may also cause irreversible data loss if the configured directory or file-age calculations are incorrect.
Because no implementation is included, this finding concerns the unsafe behavior prescribed by the Skill configuration rather than a demonstrated executable exploit.
Attack Path
- A user or Agent loads the Skill and requests memory archiving, searching, or a daily briefing.
- An implementation following the documented behavior enumerates the configured
memory/directory without a defined file-level allowlist. - Sensi ...[truncated 982 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user consent before reading, archiving, summarizing, exporting, or deleting memory records.
- Resolve the archive path canonically and enforce an allowlisted root directory. Reject absolute paths, traversal components, and symbolic links that escape that root.
- Change
autoCleantofalseby default. Present a deletion preview and require confirmation before destructive actions. - Implement backup, quarantine, or recoverable deletion with a documented restoration procedure.
- Detect and redact credentials, tokens, personal information, and other sensitive content before generating archives, search results, or briefings.
- Encrypt archived memory at rest and apply restrictive file permissions based on least privilege.
- Restrict cross-session retrieval to authorized users and narrowly scoped queries.
- Record auditable metadata for archive, search, access, and deletion operations without logging sensitive content.
- Add tests for path traversal, symbolic-link escapes, retention boundary errors, concurrent modification, unauthorized retrieval, and failed deletion recovery.
- Document the exact files eligible for processing and the security boundaries expected from any future implementation.
