Back to skill

Security audit

Matic Trades

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Matic Trades API integration that sends finance prompts to the Matic Trades service, with no evidence of hidden persistence, destructive behavior, or unrelated data access.

Install only if you intend finance prompts to be sent to Matic Trades. Keep MATIC_API_KEY private, use the default HTTPS API base unless you control the alternate endpoint, and avoid including secrets, account credentials, or sensitive trading information in prompts unless you accept that the external service will receive them.

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/matic.py:20
Finding

Unrestricted API Base URL Can Disclose Bearer Credentials and User Prompts

Content
View full analysis
str: raw = os.environ.get("MATIC_TRADES_API_BASE", "https://api.matictrades.com/api/v1").strip().rstrip("/") return raw ``` ```python def _post(path: str, body: Dict[str, Any]) -> Dict[str, Any]: url = f"{_base_url()}{path}" data = json.dumps(body).encode("utf-8") req = urllib.request.Request( url, data=data, method="POST", headers={ "Authorization": f"Bearer {_api_key()}", "Content-Type": "application/json", "Accept": "application/json", }, ) ``` ### Technical Analysis The `MATIC_TRADES_API_BASE` environment variable is used directly to construct the destination URL without validating its scheme, hostname, port, user-information component, or trust level. Every request to this destination includes the Matic Trades bearer token and the user-provided prompt. Consequently, a party capable of modifying the skill's environment or deployment configuration can set the variable to an attacker-controlled server. The script will then transmit the API key and prompt to that server. It also accepts plaintext `http://` destinations, which can expose the same data to network interception. This is a configuration-dependent vulnerability: exploitation requires influence over the environment or configuration from which the skill runs. It does not independently grant an attacker the ability to change that environment. ### Attack Path 1. An attacker gains the ability to alter the OpenClaw deployment environment, launch configuration, shell profile, or other source of `MATIC_TRADES_API_BASE`. 2. The attacker assigns an untrusted destination, for example: ```bash export MATIC_TRADES_API_BASE= ...[truncated 1479 chars]
Remediation
View remediation
str: raw = os.environ.get( "MATIC_TRADES_API_BASE", "https://api.matictrades.com/api/v1", ).strip().rstrip("/") parsed = urlsplit(raw) if parsed.scheme != "https": raise ValueError("MATIC_TRADES_API_BASE must use HTTPS") if parsed.username or parsed.password: raise ValueError("Embedded URL credentials are not allowed") if parsed.fragment or parsed.query: raise ValueError("Query strings and fragments are not allowed") if parsed.hostname not in OFFICIAL_HOSTS: raise ValueError("Untrusted Matic Trades API host") return raw ``` For legitimate self-hosted deployments, replace the fixed set with an administrator-controlled allowlist while retaining HTTPS and origin validation. ]]>
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill invokes a local Python script that uses environment variables and makes outbound network requests, but the manifest does not declare any tool scope or permission boundaries. This weakens runtime governance and increases the chance the skill will be auto-invoked with broader capabilities than users or the platform expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description contains broad trigger phrases like stocks, crypto, indicators, charts, news, sentiment, and multiple example prompts, which creates ambiguous activation boundaries. That can cause the skill to trigger unexpectedly and send user text to an external service even when the user did not clearly intend to use this specific third-party integration.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

The documented base URL and Bearer-authenticated design confirm that skill inputs are sent to an external network service. By itself, external transmission is expected for an API skill, but without prominent disclosure and data-minimization guidance it creates a real confidentiality risk, especially because financial-analysis prompts may contain sensitive strategies or uploaded chart/image context.

Content

Scanner excerpt · references/api.md (reported line 5)May include surrounding context.

md
Aligned with the backend models (`ToolExecutionRequest`, `DataRequest`, `AgentChartRequest`).

**Base:** `MATIC_TRADES_API_BASE` (default `https://api.matictrades.com/api/v1`, no trailing slash).  
**Auth:** `Authorization: Bearer <MATIC_API_KEY>`.

---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The reference explicitly instructs callers to send prompts, and elsewhere describes optional image/chart inputs, to a third-party Bearer-authenticated API without any warning about external data transmission, retention, or sensitivity handling. In an agent skill context, users may assume requests are handled locally, so undocumented off-platform transmission can expose proprietary trading ideas, watchlists, or other sensitive inputs.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
def _base_url() -> str:
    raw = os.environ.get("MATIC_TRADES_API_BASE", "https://api.matictrades.com/api/v1").strip().rstrip("/")
    return raw

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 26)May include surrounding context.

md
def _base_url() -> str:
    raw = os.environ.get("MATIC_TRADES_API_BASE", "https://api.matictrades.com/api/v1").strip().rstrip("/")
    return raw

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/matic.py (reported line 23)May include surrounding context.

python
def _base_url() -> str:
    raw = os.environ.get("MATIC_TRADES_API_BASE", "https://api.matictrades.com/api/v1").strip().rstrip("/")
    return raw

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The markdown file tells users to obtain and export MATIC_API_KEY, which is a sensitive credential, but does not include any caution about keeping the key private, avoiding commits to source control, or limiting exposure in shared environments. Under the markdown-specific missing-warning rule, this is a user-facing omission related to privacy and credential safety.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.