Back to skill

Security audit

Unified crypto market data API and scripts for exchanges, markets, tickers, OHLCV, and orderbooks

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its crypto market-data purpose, but it should be reviewed because an undocumented endpoint override can send the user's API key to a non-Milaex host.

Review before installing. Use only the official Milaex endpoint, do not set MILAEX_BASE_URL unless you fully trust the destination, avoid HTTP endpoints, and consider using a restricted or easily rotated Milaex API key. A pinned dependency file or virtual environment would also reduce install-time risk.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/milaex_client.py:35
Finding

API Credential Exfiltration Through Unrestricted Base URL Override

Content
View full analysis
MilaexConfig: base_url = os.getenv("MILAEX_BASE_URL", "https://api.milaex.com").rstrip("/") api_key = os.getenv("MILAEX_API_KEY", "").strip() if not api_key: raise SystemExit( "Missing MILAEX_API_KEY env var. " "Set it to your Milaex API key (x-api-key header)." ) return MilaexConfig(base_url=base_url, api_key=api_key) def request_json( path: str, params: Optional[Dict[str, Any]] = None, *, print_rate_headers: bool = True, timeout_s: int = 30, ) -> Any: cfg = load_config() url = f"{cfg.base_url}{path}" headers = { "x-api-key": cfg.api_key, "accept": "application/json", } try: resp = requests.get(url, headers=headers, params=params or {}, timeout=timeout_s) ``` ### Technical Analysis The client obtains its destination from the undocumented `MILAEX_BASE_URL` environment variable and sends the value of `MILAEX_API_KEY` to that destination in the `x-api-key` header. The destination is not restricted to the official Milaex API hostname, and the code does not require HTTPS. Consequently, any process or configuration source capable of influencing the skill's environment can redirect authenticated requests to an attacker-controlled endpoint. Python Requests verifies TLS certificates for HTTPS by default, but that protection does not prevent requests to an attacker-owned, validly certified hostname. The implementation also permits an `http://` URL, which could expose the key to network interception. This issue does not independently grant an attacker control of the environment. Exploitation requires influence over `MILAEX_BASE_URL` or the configuration mechanism that injects environment variables. ...[truncated 1352 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:137
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
--hash=sha256: ``` 3. Pin and hash all transitive dependencies, preferably with a dependency-locking tool. 4. Install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 5. Use a project-specific virtual environment instead of `--user` installation to avoid modifying the user's shared Python environment. 6. Document the trusted package index and avoid untrusted mirrors or additional indexes. 7. Establish dependency update and vulnerability-review procedures so pins are updated promptly when security fixes are released. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (5)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/test_unauthorized.py (reported line 20)May include surrounding context.

python
def main() -> None:
    env = dict(os.environ)
    env.setdefault("MILAEX_API_KEY", "dummy")

    p = subprocess.run(

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill requires environment access, shell execution, and outbound network access but does not declare any explicit tool scope or permissions boundary. This increases the chance an agent runtime will grant broader capabilities than necessary, making misuse of the API key or unintended command/network execution harder to constrain and audit.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 4)May include surrounding context.

md
---
name: milaex
description: Unified crypto market data API and scripts for exchanges, markets, tickers, OHLCV, and orderbooks.
homepage: https://api.milaex.com/api-docs/index.html
metadata: {"clawdbot":{"emoji":"📈","requires":{"bins":["python3"],"env":["MILAEX_API_KEY"]}}}
---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 23)May include surrounding context.

md
---
name: milaex
description: Unified crypto market data API and scripts for exchanges, markets, tickers, OHLCV, and orderbooks.
homepage: https://api.milaex.com/api-docs/index.html
metadata: {"clawdbot":{"emoji":"📈","requires":{"bins":["python3"],"env":["MILAEX_API_KEY"]}}}
---

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

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

python
env = dict(os.environ)
    env.setdefault("MILAEX_API_KEY", "dummy")

    p = subprocess.run(
        [sys.executable, os.path.join(os.path.dirname(__file__), "list_exchanges.py")],
        env=env,
        capture_output=True,

Static analysis

No suspicious patterns detected.