T09 · Insecure Skill Coding Practices
- Location
scripts/futures.js:235- Finding
Futures orders silently default to 125x leverage
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This KuCoin skill is a real trading tool, but it can move funds and place leveraged trades with weak safeguards, so it needs review before installation.
Only install after reviewing the trading safeguards. Use a KuCoin API key with the minimum permissions needed, disable withdrawals, use exchange-side IP restrictions, and avoid futures or margin permissions unless required. The skill should be changed to require explicit confirmation or dry-run approval for every trade, borrow, repay, cancellation, and transfer, remove executable transfer defaults, remove the 125x futures default, and enforce strict credential file permissions.
scripts/futures.js:235Futures orders silently default to 125x leverage
scripts/spot.js:53State-changing spot orders execute without a confirmation boundary
scripts/transfer.js:15Transfer script performs a real 100 USDT transfer when invoked without arguments
scripts/init.js:5Credential directory creation does not enforce owner-only permissions
The declared description presents a broad KuCoin trading system capable of portfolio management actions such as transfers and spot/margin/futures trading across multiple accounts. The supplied code chunk is much narrower: it instantiates a single KuCoin client, fetches account data from several account types, retrieves prices, and prints a read-only asset overview. There are no calls suggesting order creation, order cancellation, transfers, position management, or multi-account orchestration. While checking balances is consistent with the description, the description materially overstates the capabilities shown in this code chunk, so this is a description-behavior mismatch.
The description presents a broad KuCoin trading system covering multi-account support, spot/margin/futures trading, transfers, and portfolio management. The supplied code chunk is much narrower: it is a margin-focused command-line tool. It interacts with margin account endpoints (cross and isolated), borrowing/repayment, leverage setting, margin order placement, order queries, and cancellation. There is no evidence in this chunk of multi-account support, spot trading, futures trading, or asset transfer execution. In fact, the help text explicitly defers transfers to another script. Additionally, although 'enable' and 'disable' appear in the command list, the dispatcher never invokes the corresponding functions, so even some advertised margin-account management functionality is not actually exposed. Therefore, the declared description materially overstates what this code chunk does.
The declared description presents a broad KuCoin trading system covering multi-account management, spot/margin/futures trading, transfers, balances, and portfolio management. However, the supplied code only implements a spot trading CLI with three commands: place an order, view active spot orders, and cancel an order. It even explicitly defers transfers to another script. While the implemented spot trading behavior is consistent with part of the description, the overall declared purpose substantially overstates what this code chunk actually does. This is a description-versus-behavior mismatch because the code’s actual scope is materially narrower than the declared system capabilities.
The metadata marks the skill as always-on without clear activation boundaries, which is especially dangerous for a credentialed trading integration. In context, an always-available exchange skill could be selected during unrelated conversations and expose high-risk actions like querying balances, moving funds, or placing trades without sufficient contextual gating.
Referenced artifact was not completely inspected
| `node scripts/accounts.js` | List all account balances |
Referenced artifact was not completely inspected
| `node scripts/query.js` | Query all active orders |
Referenced artifact was not completely inspected
node scripts/transfer.js --from main --to trade --currency USDT --amount 100
Referenced artifact was not completely inspected
node scripts/transfer.js --from main --to trade --currency USDT --amount 100
Referenced artifact was not completely inspected
node scripts/transfer.js --from main --to trade --currency USDT --amount 100
Referenced artifact was not completely inspected
node scripts/spot.js trade --symbol BTC-USDT --side buy --type market --size 0.001
Referenced artifact was not completely inspected
node scripts/spot.js trade --symbol BTC-USDT --side buy --type market --size 0.001
Referenced artifact was not completely inspected
node scripts/spot.js trade --symbol BTC-USDT --side buy --type market --size 0.001
Referenced artifact was not completely inspected
node scripts/spot.js trade --symbol BTC-USDT --side buy --type market --size 0.001
Referenced artifact was not completely inspected
node scripts/spot.js trade --symbol BTC-USDT --side buy --type market --size 0.001
Referenced artifact was not completely inspected
node scripts/spot.js trade --symbol BTC-USDT --side buy --type market --size 0.001
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
Referenced artifact was not completely inspected
node scripts/margin.js borrowable --currency USDT
No suspicious patterns detected.