T09 · Insecure Skill Coding Practices
- Location
SKILL.md:109- Finding
Predictable Temporary Storage Exposes Resume Data and Permits Symlink Attacks
- Content
View full analysis
/` as `TEMP_DIR` 3. Persist normalized inputs: echo "$RESUME_CONTENT" > "$TEMP_DIR/resume-content.txt" echo "$STYLE" > "$TEMP_DIR/style.txt" ``` The generated prompt is also persisted: ```bash echo "$GENERATION_PROMPT" > "$TEMP_DIR/generation-prompt.txt" ``` ### Technical Analysis The temporary directory name is derived from a timestamp with one-second resolution and is therefore predictable. The workflow does not require secure, atomic directory creation, restrictive file permissions, symlink protection, ownership verification, or deletion after processing. Resume content commonly contains personally identifiable information such as names, email addresses, phone numbers, education history, employment history, and addresses. This information is written in plaintext to the shared `/tmp` hierarchy. The generated prompt may contain the same sensitive information. In a multi-user or otherwise untrusted local environment, an attacker who can write beneath `/tmp/openclaw/sn-image-resume` may predict a task identifier and pre-create the expected directory or output files. Because ordinary shell redirection follows symbolic links, a pre-created `resume-content.txt`, `style.txt`, or `generation-prompt.txt` symlink could redirect a write to another file writable by the worker account. The exact exploitability depends on permissions applied by the surrounding runtime. The documented workflow itself does not establish the controls needed to prevent this class of attack. ### Attack Path 1. A local attacker monitors or predicts when the resume-generation skill will run. 2. Th ...[truncated 1497 chars]- Remediation
View remediation
