T09 · Insecure Skill Coding Practices
- Location
SKILL.md:57- Finding
Unsafe Shell Command and API Request Construction
- Content
View full analysis
Updated full HTML content with changes merged in" }' \ "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/ARTICLE_ID/draft" ``` The same unsafe request-generation pattern is repeated in the create, category-management, image-upload, and metadata examples at lines 112–123, 192–215, 231–234, and 272–282. ### Technical Analysis The Skill instructs an agent to construct executable `curl` commands by replacing placeholders with search terms, article identifiers, titles, HTML content, and file paths. It does not require URL encoding, JSON serialization, strict identifier validation, or execution through an argument-safe API. The update request places generated article content inside a single-quoted shell argument. Article HTML or titles containing an apostrophe can terminate the shell string. If the agent performs direct textual substitution, additional shell syntax may then be interpreted as arguments, redirections, command substitutions, or separate commands. Normal content can also produce malformed JSON even when no malicious input is present. Likewise, inserting an unencoded search term directly into a URL can modify query semantics. If an agent generates shell source rather than p ...[truncated 2859 chars]- Remediation
View remediation
