T02 ยท Agent Memory Poisoning
- Location
monitor.sh:14- Finding
Untrusted Reddit Content Is Persisted into Agent Memory
- Content
View full analysis
/dev/null; then COUNT=$(echo "$RESPONSE" | jq '.data.children | length') echo "Found $COUNT results" # Write to memory file echo "" >> "$TODAY_FILE" echo "## Reddit Scout Check ($(date +%H:%M))" >> "$TODAY_FILE" echo "- Keyword: ${KEYWORD}" >> "$TODAY_FILE" echo "- Subreddit: r/${SUBREDDIT}" >> "$TODAY_FILE" echo "- Results: $COUNT" >> "$TODAY_FILE" # Extract each post echo "$RESPONSE" | jq -r '.data.children[] | "- Thread: [\(.data.title)](https://reddit.com/r/${SUBREDDIT}/comments/\(.data.id))\n Score: \(.data.score) | Author: \(.data.author)"' >> "$TODAY_FILE" ``` The same issue appears in `scripts/monitor.sh:13-33`: ```bash URL="https://www.reddit.com/r/${SUBREDDIT}/search.json?q=${KEYWORD}&sort=new&limit=${LIMIT}" echo "๐ Searching r/${SUBREDDIT} for: ${KEYWORD}" RESPONSE=$(curl -s -A "IceCube-Reddit-Scout/1.0" "$URL") if [ -z "$RESPONSE" ]; then echo "โ No response" exit 1 fi if command -v jq &> /dev/null; then COUNT=$(echo "$RESPONSE" | jq '.data.children | length') echo "Found $COUNT results" echo "" >> "$TODAY_FILE" echo "## Reddit Scout ($(date +%H:%M)) - r/${SUBREDDIT}: ${KEYWORD}" >> "$TODAY_FILE" echo "$RESPONSE" | ...[truncated 3040 chars]- Remediation
View remediation
