T09 · Insecure Skill Coding Practices
- Location
webull_skill/trading/option_order.py:247- Finding
Configured Trading Limits Are Not Enforced Across All Mutating Order Paths
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real Webull trading skill with disclosed purpose, but its code does not reliably enforce several safety controls before live financial actions.
Review this carefully before installing, especially for any account with live trading permission. Use sandbox-only credentials first, set WEBULL_ENVIRONMENT exactly to uat unless intentionally trading live, keep credentials and tokens outside the project directory, and do not rely on the advertised risk limits or confirmation text as a hard safety barrier for production orders.
webull_skill/trading/option_order.py:247Configured Trading Limits Are Not Enforced Across All Mutating Order Paths
webull_skill/sdk_client.py:96Invalid Environment Values Can Fall Through to Production SDK Endpoints
webull_skill/cli.py:1214Documented User Confirmation Requirement Is Not Enforced by the CLI
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Webull OpenAPI Skill Configuration
# Copy this file to .env and fill in your credentials
# ==============================================================================
# Required: Webull API Credentials
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Webull OpenAPI Skill Configuration
# Copy this file to .env and fill in your credentials
# ==============================================================================
# Required: Webull API Credentials
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Webull OpenAPI Skill Configuration
# Copy this file to .env and fill in your credentials
# ==============================================================================
# Required: Webull API Credentials
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Webull OpenAPI Skill Configuration
# Copy this file to .env and fill in your credentials
# ==============================================================================
# Required: Webull API Credentials
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Webull OpenAPI Skill Configuration
# Copy this file to .env and fill in your credentials
# ==============================================================================
# Required: Webull API Credentials
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cp .env.example .env
# Edit .env — fill in WEBULL_APP_KEY and WEBULL_APP_SECRET
# For Webull Japan, also set: WEBULL_REGION_ID=jp
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cp .env.example .env
# Edit .env — fill in WEBULL_APP_KEY and WEBULL_APP_SECRET
# For Webull Japan, also set: WEBULL_REGION_ID=jp
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rm -rf conf/token.txt # macOS / Linux
del conf\token.txt # Windows
webull-skill auth
The declared description presents a full-featured trading and market-data skill for Webull, but the supplied code chunk does not implement trading, market data retrieval, account/position management, regional support, or risk controls. Instead, it provides an audit logger focused on recording events and sanitizing sensitive values before logging. Audit logging may be a supporting component of such a skill, but this chunk’s actual purpose is materially narrower and different from the declared primary purpose. Therefore this code chunk does not accurately represent the declared description.
This chunk is a presentation/formatting module, not an execution or account-management module. It formats already-obtained data for accounts, positions, orders, market data, watchlists, fundamentals, and multiple asset classes, and adds region-aware disclaimers. Those behaviors partially align with the broad market-data/account-information theme of the description, but the declared purpose presents the skill as a full trading and account-management tool with configurable risk controls and broad regional support. None of those core capabilities are present in this code chunk. Because the code’s actual purpose is much narrower and omits several prominently declared capabilities, this is a description-behavior mismatch.
The description presents a comprehensive trading and market/account management skill, but this code chunk is narrowly focused on watchlist CRUD and watchlist instrument management. There is no evidence here of order placement, market data retrieval, account or position access, or configurable risk controls. While this chunk does interact with Webull data APIs and is plausibly part of a larger trading skill, the declared purpose does not accurately represent this specific code chunk’s behavior, and it omits the concrete watchlist-management capability that the code actually provides.
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
Instrument queries, account/asset operations, and all order operations (stock, option, futures, crypto, event contracts).
For full action list, order JSON formats, replace rules, and order type references, see [Trading Guide](references/skill_trading.md).
### market-data
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
Instrument queries, account/asset operations, and all order operations (stock, option, futures, crypto, event contracts).
For full action list, order JSON formats, replace rules, and order type references, see [Trading Guide](references/skill_trading.md).
### market-data
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
Instrument queries, account/asset operations, and all order operations (stock, option, futures, crypto, event contracts).
For full action list, order JSON formats, replace rules, and order type references, see [Trading Guide](references/skill_trading.md).
### market-data
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
- Fractional shares via entrust_type=AMOUNT
- Trading sessions: CORE, ALL, NIGHT
### Order Replace Rules (Futures)
- Market orders: only quantity can be modified
- Limit orders: order_type (to MARKET only), time_in_force, quantity, limit_price
- Stop orders: order_type (to MARKET only), time_in_force, quantity, stop_price
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Usage:
webull-skill trading --action stock-snapshot --symbols AAPL
webull-skill market-data --action stock-snapshot --symbols AAPL
webull-skill auth --env-file .env
"""
from __future__ import annotations