Back to skill

Security audit

Portfolio Heat

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent paid-signal purpose, but it gives an agent raw wallet signing authority for automatic paid requests without enough user-side spending controls.

Install only with a dedicated low-balance wallet on Base, not a primary wallet. Treat each invocation as a paid request, avoid automatic retries, and ensure your agent asks before spending or has an external spending limit.

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:8
Finding
Unrestricted Wallet Private Key Use for Automatic Paid Requests<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 8–48 **Vulnerability Type**: Excessive secret access and insufficient payment authorization controls **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: openclaw: requires: env: - EVM_PRIVATE_KEY primaryEnv: EVM_PRIVATE_KEY homepage: https://apexrunner.ai/signals/portfolio-heat ``` ```markdown The x402 client handles payment authorisation automatically. No API key, no account, no subscription required — just an EVM wallet with USDC on Base mainnet. ``` ```python # Example using the x402-python client from x402.client import x402_get response = x402_get( url="https://apexrunner.ai/signals/portfolio-heat", private_key=os.environ["EVM_PRIVATE_KEY"] ) print(response.json()) ``` ```markdown ## Pricing **$1.00/call** — standard price ``` ### Technical Analysis The skill requires the agent's execution environment to expose a reusable EVM wallet private key. It then passes that key to an x402 client that automatically authorizes a paid request to an external service. Although the reviewed file does not demonstrate private-key exfiltration, this design grants the skill access to signing authority broader than the read-only portfolio signal requires. The instructions specify a per-call price but provide no explicit per-request confirmation, cumulative spending ceiling, invocation-rate limit, destination allowlist enforced outside the skill, or requirement to use a dedicated low-balance wallet. Consequently, unintended, duplicated, or repeatedly triggered invocations can authorize real USDC expenditure. Directly exposing the private key through an environment variable also expands the consequences of any compromise in the agent process or imported client library. ### Attack Path 1. A user configures `EVM_PRIVATE_KEY` with an EVM wallet holding USDC on Base. 2. The agent loads the skill and obtains access to that environment variable. 3. The agen ...[truncated 1136 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Use a dedicated wallet containing only the minimum funds needed for this skill; never use a primary or broadly funded wallet. 2. Replace direct private-key exposure with a constrained signing service or wallet interface that enforces: - An allowlist for the expected chain, token, recipient, and endpoint. - A strict maximum amount per request. - Daily and cumulative spending limits. - Request-rate limits and replay protection. 3. Require explicit user confirmation before every charge, displaying the exact amount, asset, network, recipient, and endpoint. 4. Disable automatic retries for payment-bearing requests unless each retry is separately authorized or cryptographically proven not to create another charge. 5. Validate the server's payment request against a locally configured maximum rather than trusting pricing information returned by the remote service. 6. Prevent the raw private key from being logged, included in error messages, retained in agent memory, or exposed to unrelated tools and subprocesses. 7. Pin and audit the x402 client dependency, because it operates on sensitive signing material. 8. Document revocation and incident-response procedures, including wallet rotation and immediate fund migration if key exposure is suspected. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to make an x402-authenticated paid network request using a locally stored EVM private key, but it does not clearly warn that invoking the skill can spend funds or that the private key is a sensitive credential. In an agent setting, this can lead to unintended paid calls, silent wallet expenditure, and unsafe handling of signing material if users or orchestrators invoke the skill without understanding the financial and credential implications.

Static analysis

No suspicious patterns detected.