Back to skill

Security audit

Mi Analista

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent for a PredictMe trading agent, but it needs review because it asks agents to register users, store API keys in local plaintext files, trade automatically, and publish trade commentary.

Install only if you are comfortable letting an agent register with PredictMe, store a reusable API key, place TEST/BONUS bets, and publish trade commentary. Use a secret manager or a tightly permissioned file outside project directories, require explicit approval before registration and each bet until you trust the behavior, and avoid including personal details or secrets in commentary.

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
skill.md:70
Finding
Plaintext Bearer Credential Storage Without Required Access Controls## Vulnerability Details **File Location**: `skill.md`, lines 70-83 **Vulnerability Type**: Plaintext sensitive credential storage **Risk Level**: Medium **Complete Code Snippet**: ```markdown ### 2. Store Credentials Save credentials automatically. **Never ask the owner to copy-paste.** ```json // ~/.predictme/credentials.json (or project-local, add to .gitignore!) { "apiKey": "pm_agent_xxxxx", "agentId": "your-agent-id", "nonce": 0 } ``` Load from this file on every startup. If the file doesn't exist, you haven't registered yet — go to Step 1. ``` ### Technical Analysis The Skill instructs the agent to persist a bearer API key in a plaintext JSON file. It does not require restrictive directory or file permissions, atomic secure creation, an operating-system credential store, encryption at rest, or safeguards against logging and backups. The suggested project-local alternative increases the likelihood of accidental source-control inclusion. Adding the file to `.gitignore` only reduces accidental commits; it does not protect the credential from other local users, processes, development tools, backup systems, or previously staged files. This access exceeds secure minimum-privilege practice because the credential remains broadly reusable beyond the immediate API operation and potentially beyond the Skill session. ### Attack Path 1. The agent registers and retrieves the one-time API key from the PredictMe status endpoint. 2. Following the Skill instructions, it writes the API key to `~/.predictme/credentials.json` or a project-local JSON file. 3. The file is created with environment-dependent default permissions and remains unencrypted. 4. Another local user or process, repository operation, backup service, diagnostic bundle, or development tool reads or copies the file. 5. The attacker extracts the `pm_agent_*` bearer token. 6. The attacker supplies it in the `Authorization: Bearer ...` heade ...[truncated 724 chars]
Remediation
## Remediation Suggestions 1. Store the API key in an operating-system credential manager or framework-provided secret store rather than a plaintext project file. 2. If file storage is unavoidable: - Use a dedicated user-owned directory with permissions set to `0700`. - Create the credential file atomically with permissions set to `0600`. - Reject symbolic links and verify ownership before reading or writing. - Keep the file outside repositories and shared workspaces. 3. Remove the project-local storage recommendation or clearly mark it as an exceptional, unsafe fallback. 4. Programmatically verify ignore rules rather than relying solely on instructions to add the file to `.gitignore`. 5. Prevent credentials from appearing in logs, exception messages, telemetry, backups, session journals, or generated reports. 6. Provide API-key revocation and rotation procedures, including immediate rotation after suspected disclosure. 7. Scope tokens to only the endpoints and balance types required by the agent, with expiration where supported. 8. Persist the nonsensitive nonce separately so ordinary state management does not require repeatedly exposing the API key.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared purpose is a trading skill for 10-second crypto prediction markets, but the supplied code does not implement trading logic, market interaction, order placement, prediction functionality, or any crypto-related behavior. Instead, it is purely a progressive web app/service worker component focused on caching and offline performance. This is a materially different primary purpose, so the description does not accurately represent the code chunk.

Credential Access

High
Category
Privilege Escalation
Content
Save credentials automatically. **Never ask the owner to copy-paste.**

```json
// ~/.predictme/credentials.json (or project-local, add to .gitignore!)
{
  "apiKey": "pm_agent_xxxxx",
  "agentId": "your-agent-id",
Confidence
97% confidence
Finding
The skill explicitly instructs persistent access to API credentials via a local `credentials.json`, creating a direct credential exposure point. Because the key enables authenticated trading actions, compromise of this file could let another local process or attacker place trades, inspect account data, or impersonate the agent.

Hidden Instructions

High
Category
Prompt Injection
Content
</text>
    </g>

    <!-- Tagline -->
    <text x="0" y="150" text-anchor="middle" font-family="Inter, -apple-system, BlinkMacSystemFont, sans-serif" font-size="28" font-weight="400" fill="#e0e0e0" letter-spacing="2">
      Grab the Future. Predict. Win.
    </text>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</text>
    </g>

    <!-- Tagline -->
    <text x="0" y="150" text-anchor="middle" font-family="Inter, -apple-system, BlinkMacSystemFont, sans-serif" font-size="28" font-weight="400" fill="#e0e0e0" letter-spacing="2">
      Grab the Future. Predict. Win.
    </text>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<svg width="1200" height="675" viewBox="0 0 1200 675" fill="none" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <!-- Background gradient -->
    <linearGradient id="bg-gradient" x1="0%" y1="0%" x2="100%" y2="100%">
      <stop offset="0%" stop-color="#0a0b0f"/>
      <stop offset="50%" stop-color="#0f1115"/>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<svg width="1200" height="675" viewBox="0 0 1200 675" fill="none" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <!-- Background gradient -->
    <linearGradient id="bg-gradient" x1="0%" y1="0%" x2="100%" y2="100%">
      <stop offset="0%" stop-color="#0a0b0f"/>
      <stop offset="50%" stop-color="#0f1115"/>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

External Transmission

Medium
Category
Data Exfiltration
Content
description: Trade 10-second crypto prediction markets on PredictMe
version: 1.3.0
author: PredictMe
apiBase: https://api.predictme.me/api/v1/agent
agentsJson: https://app.predictme.me/agents.json
metadata:
  openclaw:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
description: Trade 10-second crypto prediction markets on PredictMe
version: 1.3.0
author: PredictMe
apiBase: https://api.predictme.me/api/v1/agent
agentsJson: https://app.predictme.me/agents.json
metadata:
  openclaw:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
description: Trade 10-second crypto prediction markets on PredictMe
version: 1.3.0
author: PredictMe
apiBase: https://api.predictme.me/api/v1/agent
agentsJson: https://app.predictme.me/agents.json
metadata:
  openclaw:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
description: Trade 10-second crypto prediction markets on PredictMe
version: 1.3.0
author: PredictMe
apiBase: https://api.predictme.me/api/v1/agent
agentsJson: https://app.predictme.me/agents.json
metadata:
  openclaw:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
description: Trade 10-second crypto prediction markets on PredictMe
version: 1.3.0
author: PredictMe
apiBase: https://api.predictme.me/api/v1/agent
agentsJson: https://app.predictme.me/agents.json
metadata:
  openclaw:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The skill expands beyond simple market interaction by directing the agent to collect the owner's email, self-register, and persist API credentials locally. That creates a broader trust boundary and increases privacy and credential-handling risk, especially because the instructions normalize autonomous account setup and secret storage without strong consent or storage controls.

External Transmission

Medium
Category
Data Exfiltration
Content
owner_email = ask_owner("What email should I register with?")

# Step 2: Register via API
response = POST("https://api.predictme.me/api/v1/agent/register", {
    "email": owner_email,
    "agentName": "YourAgentName",       # Pick a memorable name
    "description": "AI trader using momentum strategy"  # Optional
Confidence
78% confidence
Finding
The registration request transmits the owner's email to an external service as part of agent self-registration, which goes beyond a narrow trading action and introduces privacy risk. The danger is increased because the skill encourages the agent to initiate this workflow itself rather than requiring a clearly separate, user-approved onboarding step.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill tells the agent to save API credentials automatically to a local JSON file and frames this as the default behavior without meaningful security guidance. Plaintext local storage of long-lived API keys materially increases the chance of credential theft through local compromise, accidental inclusion in workspaces, backups, logs, or other tools.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The preferences and surrounding guidance present autonomous trading behavior with `requireApproval: false` as a normal configuration, without a prominent warning that the agent may place repeated trades on its own. For a financial skill, default or lightly disclosed auto-execution can lead to user surprise, unwanted loss, and insufficient human oversight.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The required commentary introduces a public broadcasting feature that is unrelated to the core trading purpose stated in the manifest. Because commentary is sent with each trade and described as broadcast to spectators, the skill can exfiltrate model-generated text or user-derived information to a public audience without a clear necessity or opt-in.

External Transmission

Medium
Category
Data Exfiltration
Content
commentary = generate_trade_commentary(
                asset, best_grid, current_price, base_price, best_ev
            )
            result = requests.post(f"{BASE}/bet", headers=headers, json={
                "gridId": best_grid["gridId"],
                "amount": f"{bet_amount:.2f}",
                "balanceType": "TEST",
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
skill.md:59