T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:121
- Finding
- AI Agent Instructions Recommend Bypassing Live-Trade Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:121-122, 145`; implemented by `longbridge_cli/commands/order.py:63-78, 98-113` **Vulnerability Type**: Agent-directed safety-control bypass **Risk Level**: High ### Evidence ```text # Skip confirmation prompt (recommended for AI Agent programmatic calls) longbridge buy AAPL.US --qty 100 --price 180.0 --yes ``` ```python @click.option("--yes", "-y", is_flag=True, help="Skip interactive confirmation") @click.pass_context def buy_cmd(ctx, symbol, qty, price, output_json, yes): require_trade_enabled() if not yes: click.confirm( f"Confirm purchase of {symbol}, quantity {qty}, limit price {price}?", abort=True, ) try: trade_ctx = TradeContext(get_config(ctx.obj.get("profile"))) resp = trade_ctx.submit_order( symbol, OrderType.LO, OrderSide.Buy, qty, TimeInForceType.Day, submitted_price=Decimal(str(price)), ) ``` The corresponding sell command uses the same `--yes` bypass before calling `submit_order()`. ### Technical Analysis The Skill explicitly recommends that an AI Agent supply `--yes` for programmatic trading. In the implementation, that flag skips `click.confirm()` and permits immediate submission of a brokerage order after the persistent `LONGBRIDGE_TRADE_ENABLED=true` setting is detected. The environment-variable gate is a useful default safeguard, but it is not transaction-specific. Once trading has been enabled, the confirmation prompt is the final control through which a user can verify the account, symbol, side, quantity, and price. Recommending that an Agent bypass it weakens the safety boundary around consequential financial actions. This is particularly dangerous where an Agent may process ambiguous instructions, untrusted market text, compromised contextual data, or prompt-injected content. ### Attack Path 1. The user or system enables ...[truncated 1083 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the instruction recommending `--yes` for AI Agent calls. 2. Require explicit, transaction-specific human approval for every live order. 3. Disable `--yes` when an Agent or other noninteractive environment is detected. 4. If noninteractive operation is necessary, limit it to a separately identified paper-trading account. 5. Display and verify the profile, account environment, side, symbol, quantity, price, estimated notional value, and currency immediately before submission. 6. Introduce configurable per-order and daily notional limits. 7. Consider short-lived approval tokens bound to the exact transaction parameters rather than a persistent environment-variable permission. ]]>
