T09 · Insecure Skill Coding Practices
- Location
index.js:11- Finding
Path Traversal Through Unvalidated Project Context
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This file-organizing skill has a coherent purpose, but it can broadly move workspace files and create directories without confirmation or strong path safety checks.
Review carefully before installing. Only use this skill in a disposable or backed-up workspace, avoid running cleanup_workspace_root on a real project, and do not pass untrusted project names or file paths until validation, dry-run confirmation, collision-safe moves, and rollback behavior are added.
index.js:11Path Traversal Through Unvalidated Project Context
index.js:84Destination File Can Be Overwritten During Routing
index.js:119Workspace Cleanup Performs Broad Destructive Moves Without Confirmation
The description emphasizes automatic organization, directory creation, and cleanup behavior but does not prominently warn that the skill can modify the workspace by moving user files. Users or other agents may invoke it assuming it is advisory, when it is actually capable of changing file locations and project structure.
Advertising legacy cleanup and migration without an explicit warning understates the operational risk of relocating existing files. In practice, this can disrupt user workflows, break references, or misclassify important files if the heuristics are wrong.
The skill is framed to activate during very common file-related workflows such as generating files, processing files via other skills, and organizing workspace clutter, but it does not define clear trigger boundaries or require explicit user approval before acting. In a file-moving skill, overly broad activation increases the chance of unintended file reorganization and surprising side effects across unrelated projects.
The cleanup API is described as scanning the workspace root and routing misplaced files, which is a broad modifying operation on existing content. Without a warning and confirmation gate, this creates a realistic risk of unintended file movement, project corruption, or loss of discoverability of user files.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Safety Rules
- Never delete files without confirmation
- Always backup before moving critical files
- Preserve original file timestamps and metadata
- Log all file operations to `memory/YYYY-MM-DD.md`
Logging all file operations to persistent memory can retain sensitive filenames, paths, project names, timestamps, and metadata beyond the immediate task. This is especially risky in a classification skill because filenames and directory structures often reveal confidential subjects, clients, or internal project details.
The cleanup routine iterates over all non-directory files in the workspace root and automatically moves them based on inferred content, without any confirmation, dry-run mode, explicit allowlist, or user-visible warning. In an agent/workspace context this can unexpectedly relocate user data, interfere with other tooling, and cause loss of availability or confusion about file locations even if the files are not deleted.