T09 · Insecure Skill Coding Practices
- Location
SKILL.md:202- Finding
Shell Command Injection Through Interpolated User and Network Inputs
- Content
View full analysis
> [DATA_DIR]/workers/retry-queue.md ``` ```bash exec: cat >> [DATA_DIR]/workers/[NAME]-results.md << 'ENDBLOCK' ### [SCORE/5] [Source Title](https://exact-url.com) - **Type:** official doc | github repo | reddit thread | blog | consulting page | other - **Relevance:** one sentence — why this matters for [TOPIC] - **Key findings:** - specific finding - specific finding - **Direct downloads:** https://direct.link/file.docx (or "none") - **Fetched:** 2026-03-07T00:00:00Z --- ENDBLOCK ``` ```bash exec: echo "[URL]" >> ~/.openclaw/workspace/skills-data/skilled-deep-research/[SLUG]/known-urls.txt ``` ### Technical Analysis The Skill instructs agents to interpolate user-controlled values and externally obtained URLs directly into shell command strings. Double quotes do not neutralize shell command substitutions such as `$(command)` or backticks. Newlines and other shell syntax can also alter the intended command. The URL values are particularly dangerous because they originate from untrusted web-search results. A malicious website can expose a crafted URL that becomes executable syntax when inserted into one of the mandatory `exec` templates. Topic, output path, slug, data-directory, worker-name, and error values present additional injection surfaces. The heredoc checkpoint pattern can also be disrupted if generated content contains the delimiter on a separate line, allowing subsequent content to be interpreted by the shel ...[truncated 1101 chars]- Remediation
View remediation
