Back to skill

Security audit

Moltmarkets Trader

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent MoltMarkets trading assistant, but it can perform live account actions and contains unsafe script argument handling that should be reviewed before use.

Review this before installing if the agent has access to your MoltMarkets key. Treat every betting, market-creation, and resolution script as a live action, not a simulation. The create-market-with-odds.sh argument handling should be fixed before use, and live writes should require explicit confirmation, clear spending limits, and preferably a dry-run mode.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/create-market-with-odds.sh:35
Finding

Arbitrary Python Code Execution Through estimated_prob Argument

Content
View full analysis
/dev/null; then echo "Error: estimated_prob must be between 0.01 and 0.99 (got: $EST_PROB)" exit 1 fi ``` ### Technical Analysis The attacker-controlled `EST_PROB` shell argument is interpolated directly into source code supplied to `python3 -c`. Shell quoting does not make this safe because the resulting value becomes part of the Python program rather than data passed to that program. An argument containing a closing quote and additional Python statements can terminate the intended `float()` expression and inject arbitrary Python code. The injected statement executes while validation is being performed. It can execute even if the subsequent assertion fails and the script exits. This violates the code/data separation required for safe interpreter invocation. Numeric validation occurs only after the untrusted value has already been interpreted as executable Python. ### Attack Path 1. An attacker influences the fourth argument passed to `create-market-with-odds.sh`. 2. The argument is constructed to close the single-quoted Python string and append a Python statement. 3. Bash substitutes the crafted value into the multiline `python3 -c` program. 4. Python parses the attacker-supplied content as source code. 5. The injected code executes with the permissions of the user running the Skill. 6. The code can read `~/secrets/moltmarkets-api-key`, modify user-accessible files, launch subprocesses, or make authenticated API requests. ### Impact Assessment Successful exploitation provides arbitrary code execution under the invoking user's account. The resulting process can access all files and services available to tha ...[truncated 420 chars]
Remediation
View remediation
&2 exit 1 fi ``` Additional hardening should include: - Perform strict shell-level syntax validation before invoking Python, such as accepting only a documented decimal format. - Pass all external values through positional arguments, standard input, or environment variables and never concatenate them into interpreter source. - Add regression tests containing quotes, semicolons, newlines, backslashes, and Python syntax. - Run the trading scripts under a dedicated, minimally privileged account whose credential can perform only required API operations. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/create-market-with-odds.sh:105
Finding

Arbitrary Python Code Execution Through seed_amount Argument

Content
View full analysis
0.5: print(f'YES|$SEED_AMOUNT|Push from 50% toward {est:.0%}') else: print(f'NO|$SEED_AMOUNT|Push from 50% toward {est:.0%}') ") OUTCOME=$(echo "$SEED_INFO" | cut -d'|' -f1) ``` ### Technical Analysis `SEED_AMOUNT` is inserted directly into Python source inside an f-string literal. The argument is not validated before this interpolation. A crafted value can close the string or function call and append arbitrary Python statements. The dangerous branch is reached after the market has already been created. Consequently, exploitation can produce both local code execution and an unintended remote side effect. Depending on the selected estimated probability, the injected content is evaluated in the corresponding `YES` or `NO` branch. This is a separate injection surface from the `EST_PROB` validation flaw. Even a legitimate numeric `EST_PROB` does not make the unvalidated `SEED_AMOUNT` safe. ### Attack Path 1. An attacker controls or influences the optional fifth `seed_amount` argument. 2. The attacker supplies a value containing Python quote-termination syntax and an additional statement. 3. The script first creates a market through the authenticated MoltMarkets API. 4. The crafted seed amount is substituted into the `python3 -c` source used to calculate `SEED_INFO`. 5. When the applicable branch runs, Python executes the injected statement with the invoking user's permissions. 6. The payload can read local secrets, execute system commands, alter files, or submit unauthorized authenticated API operations. ### Impact Assessment Exploitation permits arbitrary code execution in the context of the Skill us ...[truncated 465 chars]
Remediation
View remediation
0.5: print(f"YES|{seed_amount}|Push from 50% toward {estimated_probability:.0%}") else: print(f"NO|{seed_amount}|Push from 50% toward {estimated_probability:.0%}") ' "$EST_PROB" "$SEED_AMOUNT") ``` The upper bound should be selected according to the platform's documented risk policy. Further hardening should: - Require explicit confirmation or a dedicated `--yes` option before placing the seed bet. - Check the account balance and enforce the documented quarter-Kelly and 20% bankroll limits. - Avoid constructing JSON manually; generate request bodies with a JSON serializer. - Treat all command-line arguments as untrusted data across every Python snippet in this script. - Add tests proving that metacharacters and multiline arguments cannot alter interpreter control flow. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (46)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the implemented code lacks some of the described safeguards or capabilities, users may rely on nonexistent forecasting or sizing logic while still granting access to execute financial operations. In security terms, overbroad claims around a write-capable skill create unsafe trust and authorization decisions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the implemented code lacks some of the described safeguards or capabilities, users may rely on nonexistent forecasting or sizing logic while still granting access to execute financial operations. In security terms, overbroad claims around a write-capable skill create unsafe trust and authorization decisions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the implemented code lacks some of the described safeguards or capabilities, users may rely on nonexistent forecasting or sizing logic while still granting access to execute financial operations. In security terms, overbroad claims around a write-capable skill create unsafe trust and authorization decisions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the implemented code lacks some of the described safeguards or capabilities, users may rely on nonexistent forecasting or sizing logic while still granting access to execute financial operations. In security terms, overbroad claims around a write-capable skill create unsafe trust and authorization decisions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the implemented code lacks some of the described safeguards or capabilities, users may rely on nonexistent forecasting or sizing logic while still granting access to execute financial operations. In security terms, overbroad claims around a write-capable skill create unsafe trust and authorization decisions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the implemented code lacks some of the described safeguards or capabilities, users may rely on nonexistent forecasting or sizing logic while still granting access to execute financial operations. In security terms, overbroad claims around a write-capable skill create unsafe trust and authorization decisions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the implemented code lacks some of the described safeguards or capabilities, users may rely on nonexistent forecasting or sizing logic while still granting access to execute financial operations. In security terms, overbroad claims around a write-capable skill create unsafe trust and authorization decisions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes instructions for placing bets, creating markets, and resolving markets without an explicit warning that these are financially and operationally irreversible actions. In a trading context, missing safety language materially increases the risk of unintended loss, market manipulation, or improper resolution by a user or agent acting too quickly.

Content

No source excerpt is available for this finding.

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

md
While trading, notice and report:
- API errors or unexpected responses
- Missing fields in market data
- UX friction (confusing flows, unclear states)
- CPMM edge cases (rounding, extreme prices)

File issues at: `shirtlessfounder/moltmarkets-api` (NOT futarchy-cabal)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/check-resolution-needed.sh (reported line 17)May include surrounding context.

sh
[[ "${1:-}" == "--json" ]] && JSON_MODE=true

# Fetch markets
MARKETS=$(curl -s --max-time 10 -H "Authorization: Bearer $MM_KEY" "$API_BASE/markets")
if [ -z "$MARKETS" ]; then
  echo "ERROR: Could not fetch markets from API" >&2
  exit 1

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/create-market-with-odds.sh (reported line 75)May include surrounding context.

sh
}))
" "$TITLE" "$DESCRIPTION" "$CLOSES_AT")

CREATE_RESPONSE=$(curl -s -X POST \
  -H "Authorization: Bearer $MM_KEY" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD" \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/create-market-with-odds.sh (reported line 150)May include surrounding context.

sh
# Small delay to let the market settle in the API
sleep 1

BET_RESPONSE=$(curl -s -X POST \
  -H "Authorization: Bearer $MM_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"outcome\": \"$OUTCOME\", \"amount\": $AMOUNT}" \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/create-market.sh (reported line 48)May include surrounding context.

sh
}))
" "$TITLE" "$DESCRIPTION" "$CLOSES_AT")

RESPONSE=$(curl -s -X POST \
  -H "Authorization: Bearer $MM_KEY" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD" \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/my-positions.sh (reported line 14)May include surrounding context.

sh
echo "═══════════════════════════════════════════════════════════════"

# Fetch profile
PROFILE=$(curl -s -H "Authorization: Bearer $MM_KEY" "$API_BASE/me")

echo "$PROFILE" | python3 -c "
import json, sys

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/my-positions.sh (reported line 33)May include surrounding context.

sh
echo "───────────────────────────────────────────────────────────────"

# Fetch all markets to find ones we've participated in
MARKETS=$(curl -s -H "Authorization: Bearer $MM_KEY" "$API_BASE/markets")

echo "$MARKETS" | python3 -c "
import json, sys

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/place-bet.sh (reported line 42)May include surrounding context.

sh
echo "  Amount: ${AMOUNT}ŧ"
echo "───────────────────────────────────────"

RESPONSE=$(curl -s -X POST \
  -H "Authorization: Bearer $MM_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"outcome\": \"$OUTCOME\", \"amount\": $AMOUNT}" \

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script performs a live POST to the betting API immediately after basic argument validation, with no interactive confirmation, dry-run mode, or explicit acknowledgement that funds will be committed. In an agent skill context, this is especially dangerous because automated invocation, prompt mistakes, or malicious chaining can trigger irreversible financial transactions without meaningful human review.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/resolve-market.sh (reported line 33)May include surrounding context.

sh
echo "  Resolution: $RESOLUTION"
echo "───────────────────────────────────────"

RESPONSE=$(curl -s -X POST \
  -H "Authorization: Bearer $MM_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"outcome\": \"$RESOLUTION\"}" \

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises and instructs use of shell scripts and authenticated API operations, but it declares no tool scope or permissions. That means a caller or review system cannot accurately understand that shell execution, network access, and local secret access are required, which weakens containment and informed consent for sensitive actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger text says the skill applies to essentially any MoltMarkets trading activity, prediction market analysis, or forecasting task. Such broad routing can cause accidental activation during routine discussion, increasing the chance that sensitive shell/API actions are suggested or executed in contexts where the user only wanted advice.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The skill is designed to transmit data to an external API endpoint, including authenticated requests. External transmission is expected for a trading skill, but it remains security-relevant because prompts, identifiers, and market actions may leave the local environment and affect a real third-party service.

Content

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

md
## API Basics

- **Base URL**: `https://api.zcombinator.io/molt`
- **Auth**: `Authorization: Bearer $(cat ~/secrets/moltmarkets-api-key)`
- **Currency**: ŧ (moltmarks)
- **CPMM**: Constant Product Market Maker (YES shares × NO shares = constant)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file gives concrete bankroll sizing and betting execution guidance for prediction markets but does not include any explicit warning about financial loss, gambling-related harm, or suitability limits. In a trading skill context, that omission can encourage users to act on risky betting advice as if it were safe or generally appropriate, increasing the chance of material losses or compulsive behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script reads an API key from a local secrets file at runtime, which is a sensitive credential access operation. While the script comments describe its purpose, there is no visible user-facing warning, prompt, or disclosure that it will access credentials from ~/secrets/moltmarkets-api-key.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code accesses a credential file at ~/secrets/moltmarkets-api-key to authenticate API requests. While the script comments explain market creation and betting behavior, they do not disclose that it will read a local secret from disk, which is a sensitive operation under the warning criteria for code files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script reads an API credential from ~/secrets/moltmarkets-api-key, which is a sensitive operation. Although the script's purpose is to query account data, there is no inline warning, confirmation, or explicit disclosure that it will access local credentials.

Content

No source excerpt is available for this finding.