T09 · Insecure Skill Coding Practices
- Location
references/listening.md:127- Finding
Shell Command Injection Through Unsafe Keyword Substitution
- Content
View full analysis
${SINCE}" \ | jq '.hits[] | {title, url, author, points, num_comments, created_at, story_id: .objectID, hn_url: ("https://news.ycombinator.com/item?id="+.objectID)}' ``` ```bash curl -s "https://hn.algolia.com/api/v1/search_by_date?query=KEYWORD&tags=comment&numericFilters=created_at_i>${SINCE}" \ | jq '.hits[] | {author, comment_text, story_title, hn_url: ("https://news.ycombinator.com/item?id="+.objectID)}' ``` It is also used for Bluesky: ```bash curl -s "https://public.api.bsky.app/xrpc/app.bsky.feed.searchPosts?q=KEYWORD&limit=25&sort=latest" \ | jq '.posts[] | {author: .author.handle, text: .record.text, likes: .likeCount, replies: .replyCount, url: ("https://bsky.app/profile/"+.author.handle+"/post/"+(.uri | split("/") | last))}' ``` ### Technical Analysis The workflow directs the Agent to replace the literal `KEYWORD` placeholder with user-controlled values such as brand names, competitor names, and search phrases. These values are placed directly inside double-quoted shell arguments without validation or shell-safe parameter handling. Double quotes do not suppress command su ...[truncated 2050 chars]- Remediation
View remediation
