Substituting raw topic text into the example shell commands can enable command injection
Source references: 3The tooling instructions tell the agent to replace QUERY or SUBREDDIT inside shell examples without requiring URL encoding, input validation, or safe argument passing. If replacement is textual, input containing quotes or shell operators can alter the command.
A malicious or accidentally crafted topic could run additional shell commands with the agent’s permissions, read accessible files, modify the workspace, or make unintended network requests.
These are documentation examples, not a shown auto-executing script. The Google News example instructs partial encoding with `+` and `%22`; complete URL encoding would keep topic text from changing shell syntax. However, the document does not require complete encoding or safe argument passing, and SUBREDDIT is unvalidated, so naïve substitution of untrusted text could permit command injection. Users can prohibit shell-string interpolation, require a URL-encoding library and an allowlist, and inspect the final command before execution.
This assessment concerns the code and conditions shown, not proof that harm has occurred.```bash# Replace QUERY with topic (use + for spaces, %22 for quotes)curl -s "https://news.google.com/rss/search?q=QUERY&hl=en-US&gl=US&ceid=US:en" \ | xmllint --xpath "//item[position()<11]" - 2>/dev/null```Show 2 other places
```bashSINCE=$(($(date +%s) - 86400))curl -s "https://hn.algolia.com/api/v1/search_by_date?query=QUERY&tags=story&numericFilters=created_at_i>${SINCE}" \ | jq '.hits[] | {title, url, points, num_comments, created_at, hn_url: ("https://news.ycombinator.com/item?id="+.objectID)}'``````bashcurl -s -A "newsjack/1.0" \ "https://www.reddit.com/r/SUBREDDIT/top.json?t=day&limit=15" \ | jq '.data.children[].data | {title, url, score, num_comments, created_utc}'```