Back to skill

Security audit

Predictclaw Publish Docs 20260320

Security checks for vulnerabilities and agentic risk

Overview

PredictClaw is a disclosed trading and wallet skill, but it gives sensitive keys and authenticated requests to configurable external targets in ways users should review carefully.

Install only if you understand it is a live trading and wallet-control tool. Use test-fixture or testnet first, keep only limited funds on keys, avoid custom PREDICT_API_BASE_URL values unless you control and trust the endpoint, and only enable ERC_MANDATED_MCP_COMMAND for a trusted MCP executable in a clean environment without unrelated secrets.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
lib/mandated_mcp_bridge.py:548
Finding

Configurable MCP Subprocess Inherits the Entire Parent Environment

Content
View full analysis
None: argv = shlex.split(self._config.mandated_mcp_command) if not argv: raise MandatedVaultMcpUnavailableError( "Mandated-vault MCP command is empty." ) env = os.environ.copy() env["ERC_MANDATED_CONTRACT_VERSION"] = self._config.mandated_contract_version if self._config.mandated_chain_id is not None: env["ERC_MANDATED_CHAIN_ID"] = str(self._config.mandated_chain_id) _apply_default_rpc_env(env, self._config) try: self._process = await asyncio.create_subprocess_exec( *argv, stdin=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, limit=1024 * 1024, env=env, ) ``` ### Technical Analysis The MCP launcher command is configurable through `ERC_MANDATED_MCP_COMMAND`, but the launched executable receives a copy of the complete parent-process environment through `os.environ.copy()`. The inherited environment can contain sensitive values used elsewhere by the Skill, including: - `PREDICT_PRIVATE_KEY` - `PREDICT_PRIVY_PRIVATE_KEY` - `ERC_MANDATED_AUTHORITY_PRIVATE_KEY` - `ERC_MANDATED_EXECUTOR_PRIVATE_KEY` - `PREDICT_API_KEY` - `OPENROUTER_API_KEY` - Unrelated secrets injected into the OpenClaw process by the host The subprocess only requires a limited collection of MCP and chain configuration values. Giving it every parent environment variable violates least privilege. Although `create_subprocess_exec` avoids shell interpretation, it does not prevent a malicious, compromised, or incorrectly selected executable from reading and disclosing inherited secrets. The command is parsed with `shlex.split`, so this is not a demonstrated ...[truncated 1502 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
lib/config.py:338
Finding

Arbitrary API Base URL Can Receive API Keys, Authentication Signatures, and JWTs

Content
View full analysis
dict[str, str]: headers = {"Accept": "application/json"} if self._config.api_key: headers["X-API-Key"] = self._config.api_key.get_secret_value() if authenticated: if self._jwt_provider is None: raise PredictApiError( "Authenticated predict.fun request requires a JWT provider.", method="AUTH", ) headers["Authorization"] = f"Bearer {await self._jwt_provider()}" return headers ``` ### Technical Analysis `PREDICT_API_BASE_URL` is accepted without validating its scheme, hostname, port, or origin. Consequently, the Skill can send sensitive authentication material to any endpoint selected through environment configuration. The API key is attached to every request whenever configured. Authenticated operations also attach a bearer JWT. Before obtaining that JWT, the authentication flow retrieves a message from the configured endpoint, signs it locally, and submits the signer address, message, and signature to the same endpoint. Private keys are not directly transmitted, but API keys, JWTs, account identifiers, and signatures can be exposed. The flagged network behavior in `lib/positions_service.p ...[truncated 2274 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (106)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 29)May include surrounding context.

clawhub install predictclaw cd ~/.openclaw/skills/predictclaw uv sync cp .env.example .env

text

通过打包方式安装后,skill 目录通常就在 `~/.openclaw/skills/predictclaw`。在 OpenClaw 的一些清单或示例里,这个路径也可能写成 `{baseDir}`。

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.zh-CN.md (reported line 29)May include surrounding context.

clawhub install predictclaw cd ~/.openclaw/skills/predictclaw uv sync cp .env.example .env

text

通过打包方式安装后,skill 目录通常就在 `~/.openclaw/skills/predictclaw`。在 OpenClaw 的一些清单或示例里,这个路径也可能写成 `{baseDir}`。

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 41)May include surrounding context.

bash
cd {baseDir} && uv sync
cd {baseDir} && cp .env.example .env

在仓库内本地开发

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.zh-CN.md (reported line 41)May include surrounding context.

bash
cd {baseDir} && uv sync
cd {baseDir} && cp .env.example .env

在仓库内本地开发

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Mandated-vault MCP bridge integration, session orchestration, policy simulation, and transaction preparation are highly privileged behaviors compared with the simple market/trading CLI framing. Understating such capabilities makes the skill more dangerous in context because it can influence or prepare blockchain actions via an external subprocess bridge, expanding the trust boundary significantly.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.