Back to skill

Security audit

ApeWisdom Reddit Scanner

Security checks for vulnerabilities and agentic risk

Overview

This skill appears benign: it transparently fetches Reddit stock-sentiment data from ApeWisdom, with only minor scoping and reliability caveats.

Install only if you are comfortable with the skill making outbound requests to ApeWisdom for market-sentiment data. Treat results as informational rather than financial advice, and prefer a version that adds an HTTP timeout and explicit least-privilege network permission metadata.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan_reddit.py:14
Finding

External HTTP Request Lacks a Timeout

Content
View full analysis

Vulnerability Details

File Location: scripts/scan_reddit.py, line 14
Vulnerability Type: Unbounded outbound HTTP request
Risk Level: Medium

python
def get_trending(filter_name="all-stocks", limit=20):
    url = f"{BASE_URL}/{filter_name}"
    try:
        response = requests.get(url)
        response.raise_for_status()
        data = response.json()
        return data.get("results", [])[:limit]
    except requests.exceptions.RequestException as e:
        print(f"Error fetching data: {e}", file=sys.stderr)
        sys.exit(1)

Technical Analysis

The call to requests.get(url) does not specify a connection or read timeout. The Requests library does not time out by default, so the process may wait indefinitely if the remote service accepts a connection but delays or never completes its response.

Although RequestException is handled, that handler does not mitigate a connection that remains open without producing an exception. Exploitation requires disruption of, or influence over, the ApeWisdom service or the network path used to reach it.

Attack Path

  1. A user or Agent invokes the Reddit scanner.
  2. The script connects to the configured ApeWisdom API endpoint.
  3. The upstream endpoint, proxy, or network intermediary accepts the connection but stalls during connection establishment or response delivery.
  4. Because no timeout is configured, the HTTP operation remains blocked.
  5. Repeated or concurrent invocations can occupy execution workers and consume process, connection, or orchestration capacity.

Impact Assessment

This issue affects availability rather than confidentiality or integrity. An attacker does not gain local privileges, code execution, filesystem access, or access to secrets. The practical scope is the scanner process and, where executions share a constrained worker pool, other tasks that depend on the same execution capacity. Repeated stalled requests co ...[truncated 51 chars]

Remediation
View remediation

Remediation Suggestions

Configure explicit connection and read timeouts and handle timeout failures separately:

python
try:
    response = requests.get(url, timeout=(5, 15))
    response.raise_for_status()
except requests.exceptions.Timeout as e:
    print(f"Request timed out: {e}", file=sys.stderr)
    sys.exit(1)
except requests.exceptions.RequestException as e:
    print(f"Error fetching data: {e}", file=sys.stderr)
    sys.exit(1)

If retries are required, use a requests.Session with a bounded retry policy, exponential backoff, and an overall retry limit. Avoid unbounded retries, and ensure the surrounding task runner also enforces a maximum execution duration.

Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs the agent to run a Python script that fetches live data from an external API, which implies network access, but the manifest does not declare any explicit tool scope such as permissions or allowed-tools. This creates a governance gap: an agent or runtime may permit broader networked execution than intended, making external requests without clear authorization boundaries or review.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.