Back to skill

Security audit

MoneySharks

Security checks for vulnerabilities and agentic risk

Overview

This skill clearly discloses autonomous real-money trading, but verified safety-control weaknesses make it something users should review carefully before installing.

Install only if you intentionally want an unattended agent with Aster futures trading authority. Use restricted API keys, IP allowlisting if available, keep it in paper mode until audited, avoid setting ASTER_BASE_URL except to the official endpoint, and verify the approval, risk-limit, and protective-order behavior before enabling live trading.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/aster_readonly_client.py:20
Finding

Configurable API Base URL Allows Credential Disclosure and Exchange Response Spoofing

Content
View full analysis
dict: params = dict(params or {}) for attempt in range(max_retries + 1): try: req_params = dict(params) headers = {} if method == "GET": if private: if not API_KEY or not API_SECRET: raise RuntimeError("missing ASTER_API_KEY/ASTER_API_SECRET") req_params["timestamp"] = _timestamp() req_params["signature"] = _sign(req_params) headers["X-MBX-APIKEY"] = API_KEY query = urllib.parse.urlencode(req_params) url = BASE_URL + path + (("?" + query) if query else "") req = urllib.request.Request(url, headers=headers, method="GET") elif method == "DELETE": if private: if not API_KEY or not API_SECRET: raise RuntimeError("missing ASTER_API_KEY/ASTER_API_SECRET") req_params["timestamp"] = _timestamp() req_params["signature"] = _sign(req_params) headers["X-MBX-APIKEY"] = API_KEY query = urllib.parse.urlencode(req_params) url = BASE_URL + path + "?" + query req = urllib.request.Request(url, headers=headers, method="DELETE") else: headers["Content-Type"] = "application/x-www-form-urlencoded" if private: if not API_KEY o ...[truncated 2802 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/live_execution_adapter.py:52
Finding

Per-Trade Approval Can Be Bypassed with an Arbitrary Token or Input Flag

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/aster_readonly_client.py:364
Finding

Non-Atomic Bracket Placement Can Leave Live Positions Without Protective Orders

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/risk_checks.py:24
Finding

Declared Hard Risk Limits Can Be Disabled or Bypassed

Content
View full analysis
0) max_exposure = float(payload.get("max_total_exposure", 0)) if max_exposure > 0 and float( payload.get("exposure_after_trade", 0) ) > max_exposure: failures.append("max_total_exposure") # Per-trade notional cap (only enforced if limit is set > 0) max_notional = float(payload.get("max_notional_per_trade", 0)) if max_notional > 0 and float( payload.get("notional", 0) ) > max_notional: failures.append("max_notional_per_trade") ``` The concurrent-position limit is converted into only one component of a nine-point confidence score: ```python max_pos = int(payload.get("max_concurrent_positions", 3)) cur_pos = int(payload.get("current_positions", 0)) checks["position_capacity_ok"] = cur_pos < max_pos ``` ```python passed = [name for name in ALL_CHECKS if checks.get(name)] failed = [name for name in ALL_CHECKS if not checks.get(name)] confidence = len(passed) / len(ALL_CHECKS) ``` The final execution risk payload does not contain the current or maximum position count: ```python risk_payload = { "daily_loss_hit": daily_loss >= max_daily_loss if max_daily_loss else False, "exposure_after_trade": float(account.get("total_exposure", 0)) + float((order_params or {}).get("notional", 0)), ...[truncated 2834 chars]
Remediation
View remediation
= max_concurrent_positions`. 6. Recalculate exposure and position count from the exchange immediately before order submission. 7. Revalidate all hard limits inside the live execution adapter rather than trusting upstream calculations. 8. Ensure configuration edits cannot silently increase risk after consent; require renewed explicit authorization for material risk increases. 9. Use atomic, permission-restricted configuration writes and verify configuration integrity before every autonomous cycle. 10. Add tests for zero and negative limits, NaN and infinity, maximum-position saturation, stale position state, and concurrent cycles attempting entries simultaneously. ]]>
Vulnerability Patterns
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (125)

Tainted flow: 'req' from os.getenv (line 94, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The client builds outbound requests using a base URL taken directly from the ASTER_BASE_URL environment variable, and private requests attach API keys plus HMAC-signed parameters before sending them. If an attacker can influence that environment variable, the tool can exfiltrate authenticated trading metadata and route live trading actions to an attacker-controlled endpoint, which is especially dangerous in an autonomous trading agent.

Content

Scanner excerpt · scripts/aster_readonly_client.py (reported line 96)May include surrounding context.

python
url = BASE_URL + path
                req = urllib.request.Request(url, data=body, headers=headers, method=method)

            with urllib.request.urlopen(req, timeout=20) as resp:
                return json.loads(resp.read().decode())

        except urllib.error.HTTPError as e:

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a complex autonomous trading system for Aster DEX with live trading, risk management, monitoring, and learning capabilities. The supplied code chunk does none of that. It only creates a packaged archive of the skill directory using zip and excludes a few file patterns. This is a materially different primary purpose and lacks any implementation related to trading, exchange access, credentials, monitoring, or learning.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear material mismatch between the declared purpose and the supplied code. The description promises an end-to-end autonomous live trading system for Aster DEX, including execution and ongoing trade/risk management without per-trade approval. The actual code is a minimal approval-preparation utility: it reads input, constructs a proposal object, sets status to PENDING_APPROVAL, and prints it. This indicates a manual or gated approval workflow rather than autonomous execution, and there is no evidence of any trading, credential onboarding, exchange access, monitoring, risk controls, journaling, or learning functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a comprehensive autonomous live trading system for Aster DEX, including credential onboarding, continuous real-money execution, order/position management, risk controls, journaling, and learning. The provided code only parses input JSON and prints a static status payload saying it is in a safe loop that emits approval-gated proposals. Its primary purpose is materially different: a watcher/proposal stub rather than an autonomous trading agent. The code also explicitly conflicts with the claim of zero per-trade approval by stating 'approval-gated proposals only.'

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a full autonomous trading system with continuous live execution, monitoring, risk controls, and learning behavior. The supplied code does not implement any of those capabilities; it only provides example environment variable exports for API configuration. While credential configuration is a supporting detail consistent with onboarding, the actual code chunk’s behavior is far narrower than the declared primary purpose, so the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a comprehensive autonomous live trading system for Aster DEX, including real-money execution and full trade lifecycle management. The supplied code chunk only sources an example environment script and invokes a Python script named 'aster_proposal_runner.py' with an example config and fixed arguments (BTCUSDT, BUY). Based on this chunk alone, its behavior is limited to launching an example/proposal runner, not the broad autonomous trading capabilities described. This is a material purpose mismatch, not just an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a complete autonomous live trading system with execution, monitoring, risk enforcement, journaling, and learning. The supplied code only generates an approval-gated trade proposal from market scan output and explicitly marks it as PENDING_APPROVAL, instructing a separate adapter to execute it later. It uses read-oriented market data and config input, but does not place orders, monitor positions, manage stops, enforce continuous risk rules, or implement journaling/self-learning. This is a material description-to-behavior mismatch in primary purpose and capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description claims a comprehensive autonomous live-trading agent with continuous operation and advanced lifecycle management. The code is instead a lower-level API client plus CLI wrapper for Aster DEX. It does include real trading capabilities—private account access, leverage changes, order placement/cancellation, market close, and a simple bracket helper—so part of the declared domain is correct. However, the primary purpose is materially different: this code does not implement autonomy, scheduling, decision-making, strategy logic, trailing stop updates, risk rules, journaling, review/learning metrics, or any self-learning mechanism. The mismatch is therefore substantial because the description overstates the code's actual behavior and core functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a complete autonomous live trading system for Aster DEX, including real-money execution and lifecycle management. The provided code does not implement any of those core capabilities. Instead, it performs a narrow analytical function: deriving and reporting confluence checks from supplied market features and risk parameters. This is not merely a supporting detail shown in isolation; the actual code chunk’s primary purpose is trade-setup scoring, which is materially different from the declared autonomous trading agent behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a full autonomous trading system for Aster DEX with real-money execution and lifecycle management. The supplied code does not perform trading, exchange interaction, credential onboarding, order management, monitoring, risk controls, journaling, or learning. It only computes market features from provided kline/price data and prints them. This is not merely an incomplete excerpt of the declared behavior; its primary purpose is materially narrower and different: feature engineering/indicator calculation rather than autonomous trading.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a complete autonomous trading system for live perpetual futures trading on Aster DEX. The supplied code chunk is much narrower: it is a signal-generation module that reads JSON features from stdin, scores long/short setups with fixed technical rules, and emits a recommended signal with confidence. It includes limited position-aware logic for hold/close recommendations, but no exchange connectivity, no order placement, no account onboarding, no bracket/trailing stop handling, no persistent monitoring loop, no journaling, and no learning component. This is a material description-behavior mismatch because the code's actual primary purpose is signal computation, not full autonomous trading lifecycle management.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents the skill as a complete autonomous live trading agent covering the full trading lifecycle on Aster DEX. The supplied code, however, is only a supporting maintenance/review script. Its primary function is to populate outcome and realized PnL fields in a local trades journal by querying realized PnL income history for live trades or estimating paper-trade outcomes from current market price. It also adds simple lesson tags. While this aligns with the journaling/review/self-learning support aspects of the description, it does not implement the central advertised capabilities such as onboarding, continuous execution, order placement, stop management, risk enforcement, or autonomous trading operation. Therefore the description materially overstates and misrepresents what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a full autonomous trading system for Aster DEX, including execution, risk management, monitoring, journaling, and self-learning. The supplied code chunk is much narrower: it is an emergency halt script. It updates state.json to mark the system halted, may cancel orders for allowed symbols if credentials are present, may flatten positions only when explicitly requested, and appends a halt event to trades.json. While halting/canceling/flattening can be part of a larger trading system's risk controls, this code does not implement the described autonomous trading lifecycle and its primary purpose is materially different from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a complete autonomous trading system for Aster DEX, including credential onboarding, live order execution, position/risk management, and learning from past trades. The supplied code does not perform any trading, exchange interaction, credential management, monitoring, or learning. It only journals a provided trade entry to a JSON file and echoes it. While journaling is one small component mentioned in the description, the actual code chunk's primary purpose is materially narrower and different from the declared end-to-end autonomous trading functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description claims a comprehensive autonomous trading agent covering onboarding, ongoing autonomous operation, monitoring, risk controls, journaling, and learning. The supplied code implements only a small execution component: it validates inputs, checks for credentials, optionally requests approval in one mode, and places a single bracket trade. This is materially narrower than the declared purpose. While bracket-order execution is consistent with part of the description, most of the advertised autonomous-agent capabilities are absent from this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a fully autonomous end-to-end trading agent that can execute and manage real-money perpetual futures trades continuously. The supplied code chunk is only a readonly market scan and trade-planning component: it retrieves market/account data, computes indicators/signals, derives risk parameters, and emits a recommendation object. It does not submit orders, manage existing orders over time, enforce risk through execution controls, or implement journaling/self-learning. While some elements align with risk-aware trade preparation, the primary behavior is materially narrower than the declared purpose, so this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a complete autonomous live trading system for Aster DEX, including credential onboarding, continuous real-money execution, position management, hard risk enforcement, journaling, and adaptive learning. The provided code does not implement those functions. It only loads three local JSON files, calls other local scripts to compute analytics, and prints an output object with signal/confluence/leverage plus an explicit note that it is a 'paper runner only; no live order placement.' This is a material purpose mismatch: the code appears to support simulated or advisory analysis, not autonomous live trading.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description claims a complete autonomous live trading agent with execution, order management, risk enforcement, onboarding, and adaptive learning. This code chunk only implements one subsystem: post-hoc position monitoring and trade journal/state updates. It reads config/state/trade files, queries a read-only client for live positions and income history, infers whether positions were closed, updates realised PnL and lesson tags, and increments daily loss. While some of this supports the broader described system (position monitoring, journaling, limited risk-state tracking), the actual code's primary purpose is much narrower and does not match the full declared capability set.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a complete autonomous live trading system for Aster DEX, including onboarding, execution, monitoring, risk controls, journaling, and learning. The supplied code does none of that. It only reformats input JSON into a basic order object with fields like symbol, side, quantity, leverage, stop_loss, and take_profit, then prints it. This is materially narrower and different in purpose from the declared autonomous trading agent, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a comprehensive autonomous live trading system for Aster DEX, but the provided code only implements a narrow leverage recommendation heuristic. It does not interact with any exchange, manage trades or positions, enforce account-level risk controls, journal outcomes, or perform adaptive learning. This is a material description-to-behavior mismatch because the code's primary purpose is much narrower and substantially different from the declared end-to-end autonomous trading agent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a comprehensive autonomous live trading system with execution, order management, risk controls, journaling, and learning. The supplied code does not implement those behaviors. It only reconciles current account state: fetches or accepts account/positions/orders data, summarizes equity, margin, exposure, and open positions, and optionally updates a local state.json snapshot. This is materially narrower and different in primary purpose from an autonomous trading agent. Although it accesses Aster account data and local state files in a way that could support a broader trading system, this chunk itself is strictly a read/reconcile component, so the description does not accurately represent the code chunk's actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a complete autonomous live trading system for Aster DEX, including trade lifecycle management, risk controls, and learning. The supplied code does none of that. It only prepares cron job registration data by loading templates, substituting absolute paths and config locations, toggling enabled jobs for autonomous_live vs paper mode, and writing the resulting JSON output. While some job names reference autonomous trading workflows, this script itself is merely deployment/configuration glue for scheduling. That is a materially different primary purpose from the declared autonomous trading agent, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description is for a broad end-to-end autonomous trading agent. The supplied code chunk is only a support script for resuming that system after a halt. It resets flags in state.json, updates config mode, records a resume event, optionally reads account/position data from Aster for reconciliation, and can invoke autonomous_runner.py once. While these actions are related to the larger trading system, this specific code does not implement the core behaviors emphasized in the description (continuous trading, order management, risk logic, adaptive learning). Its primary purpose is materially different: administrative recovery and mode switching. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a complete autonomous live trading system for Aster DEX, including onboarding, execution, order management, risk enforcement, and continuous operation. The supplied code does not implement any of those core capabilities. It only consumes existing trade journal data from stdin and produces a review summary with basic performance metrics and lesson signals. While this aligns with the narrow 'self-learning from past trades' portion of the description, it is only a small analytical component rather than the described end-to-end autonomous trading agent. Therefore the code chunk’s actual primary purpose is materially narrower and different from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description describes a complete autonomous trading system with broad operational capabilities across the full trading lifecycle. The supplied code chunk does not implement that primary purpose; it only performs a small subset of the stated functionality, namely pre-trade hard risk checks. It does not place trades, interact with Aster DEX, manage positions or orders, onboard credentials, journal trades, or perform any learning. While risk enforcement is consistent with one part of the description, the actual code is materially narrower than the declared purpose, so this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.