Back to skill

Security audit

IceCube Reddit Scout

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a Reddit monitoring tool, but it under-scopes email access and persists untrusted Reddit content into agent memory without clear safeguards.

Review before installing. Use a dedicated mailbox or label for Reddit alerts, avoid storing full post/comment content unless needed, keep OAuth secrets out of plaintext config where possible, and treat all saved Reddit content as untrusted data that must never be followed as instructions. Do not enable heartbeat, cron, Telegram, browser automation, or work-queue actions without explicit user approval and retention limits.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 ยท Agent Memory Poisoning

Warning
Location
monitor.sh:14
Finding
Untrusted Reddit Content Is Persisted into Agent Memory<![CDATA[ ## Vulnerability Details **File Location**: `monitor.sh:14-45`; duplicated implementation in `scripts/monitor.sh:13-33` **Vulnerability Type**: Persistent indirect prompt injection through untrusted external content **Risk Level**: Medium ### Vulnerable Code `monitor.sh:14-45`: ```bash # Fetch Reddit search results (anonymous API) URL="https://www.reddit.com/r/${SUBREDDIT}/search.json?q=${KEYWORD}&sort=new&limit=${LIMIT}" echo "๐Ÿ” Searching r/${SUBREDDIT} for: ${KEYWORD}" # Fetch and parse RESPONSE=$(curl -s -A "IceCube-Reddit-Scout/1.0" "$URL") if [ -z "$RESPONSE" ]; then echo "โŒ No response from Reddit (rate limited or network error)" exit 1 fi # Extract posts using jq (if available) if command -v jq &> /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
<![CDATA[ ## Remediation Suggestions 1. **Separate external data from trusted agent memory** - Store Reddit responses in a dedicated untrusted-data directory rather than behavioral or instructional memory. - Do not automatically include these records in system prompts or trusted long-term context. 2. **Use a structured storage format** - Store records as JSON with explicit fields such as `source`, `retrieved_at`, `title`, `author`, and `trust_level`. - Mark every externally sourced field as untrusted. 3. **Enforce downstream instruction/data separation** - Require consuming agents to treat Reddit content only as quoted data. - Explicitly prohibit following instructions, links, or action requests found inside retrieved posts. - Place trusted processing instructions outside the external-content container. 4. **Validate and constrain fields** - Enforce maximum lengths for titles, authors, and identifiers. - Remove control characters and reject malformed values. - Validate Reddit post IDs and author names against conservative allowlists before constructing links. 5. **Escape rendered output** - Escape Markdown metacharacters before writing titles or authors into Markdown. - Prefer fenced or quoted representations that clearly delimit external content. - Note that escaping is defense in depth and does not replace semantic prompt-injection controls. 6. **Add approval boundaries** - Require human confirmation before drafting public replies, contacting users, changing persistent state, or invoking tools based on fetched content. - Never convert external text directly into executable actions. 7. **Deduplicate and harden both implementations** - Consolidate `monitor.sh` and `scripts/monitor.sh` into one reviewed implementation. - Apply identical validation and trust-boundary controls wherever Reddit data is processed. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill instructs the agent to read Reddit alert emails but provides no privacy warning or boundaries for mailbox access. Email often contains unrelated personal, business, and authentication information, so a loosely scoped email-reading workflow can expose sensitive content far beyond Reddit notifications.

Context Leakage

High
Category
Data Exfiltration
Content
### Step 2: Extraction
When keyword found:
- Extract thread title, content, score, comments
- Detect intent signal (wish/need/looking_for)
- Calculate relevance score
Confidence
89% confidence
Finding
The extraction step explicitly instructs the agent to collect thread title, content, score, and comments, then later log results to persistent memory and action queues. This creates a context-leakage risk because large amounts of third-party content and derived intent can be unnecessarily ingested into the agent context, stored, and potentially reused in unrelated tasks or exposed through later prompts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill declares only a binary requirement for curl but does not define an explicit tool/permission scope despite instructing shell-based network access. In an agent environment, this can cause overbroad execution authority or ambiguous policy enforcement, increasing the chance the skill is invoked with more capabilities than intended.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The manifest description explicitly says 'No cloud dependency', but the rest of the file describes a workflow that relies on external online services such as Reddit keyword alerts, Reddit OAuth/API access, F5Bot, and optional Telegram notifications. This is an active contradiction in the skill's own documentation, not merely an omitted detail.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The manifest uses broad trigger phrases like 'brand monitoring' and 'lead generation from Reddit', which can cause unintended invocation in loosely related conversations. Unnecessary activation matters because this skill performs external monitoring, reads alerts, and writes persistent memory/work-queue artifacts, potentially exposing user context or causing unwanted data collection.

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
Lines L078-L088 present email-based Reddit keyword alerts as a native free setup path for the skill, but later sections state Reddit has blocked anonymous API access and that operation must use OAuth, browser automation, or F5Bot. These instructions create conflicting expectations about how the skill actually obtains Reddit data and whether direct native-alert ingestion is a supported implementation path.

Ssd 3

Medium
Confidence
92% confidence
Finding
The skill directs the agent to retain and summarize email-derived Reddit alerts and mentions in persistent memory for later use. Persistent storage of third-party communications and inferred intent expands the blast radius of any later compromise and may violate data-minimization expectations or privacy requirements.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill describes writing monitored data into persistent memory files and work queues without prominently warning users. This can lead to silent retention of third-party content, inferred intent, and operational tasks, creating privacy, compliance, and over-collection risks in environments where users may expect ephemeral processing.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill tells users to configure OAuth credentials but omits guidance on secure handling of client secrets and related tokens. In agent environments, missing secret-management instructions often results in credentials being hardcoded in config files, logged, or written into memory, enabling account abuse or unauthorized API access.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The script appends search metadata and post details to a dated markdown file under $HOME/.openclaw/workspace/memory/reddit-mentions. Although it logs the file path afterward, there is no prior warning or confirmation that fetched content will be stored persistently in the user's home directory.

Static analysis

No suspicious patterns detected.