T09 · Insecure Skill Coding Practices
- 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: MediumVulnerable 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
- Require explicit, informed approval immediately before migrating each sensitive category, especially financial records, personal directives, and historical incidents.
- Create a versioned backup of
MEMORY.mdand the completefacts/directory before every write, move, overwrite, or deletion operation. - Validate the backup by checking readability, file counts, and cryptographic hashes before proceeding.
- 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.
- Prohibit deletion during automatic maintenance. Present proposed deletions to the user and require explicit confirmation.
- Apply least-privilege file permissions to
MEMORY.md,facts/, temporary files, and backups. Avoid shared or globally readable directories. - Detect and redact secrets such as credentials, tokens, private keys, account identifiers, and authentication data rather than moving them into additional plaintext files.
- Minimize duplicated sensitive information and define retention periods for migrated records and backups.
- 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.
- Record an auditable migration manifest containing source section, destination, timestamp, checksum, and user authorization without logging the sensitive content itself.
