T09 · Insecure Skill Coding Practices
- Location
scripts/solana.js:149- Finding
Human-confirmation and mainnet safeguards can be bypassed through an agent-controlled option
- Content
View full analysis
MAX_SOL_PER_TX) { throw new Error(`Amount ${amount} SOL exceeds max limit of ${MAX_SOL_PER_TX} SOL`); } // SECURITY: Check testnet (warn if mainnet) const connection = getConnection(DEFAULT_RPC); if (!isTestNet(DEFAULT_RPC) && dryRun === false && !skipConfirmation) { console.warn('⚠️ WARNING: Running on MAINNET with real transactions!'); } // SECURITY: Require human confirmation for large amounts if (amount >= REQUIRE_HUMAN_CONFIRMATION && !skipConfirmation && dryRun === false) { throw new Error(`Amount ${amount} SOL requires human confirmation (threshold: ${REQUIRE_HUMAN_CONFIRMATION} SOL)`); } ``` The transaction is subsequently broadcast without any independent authorization check: ```javascript // Send real transaction const txSignature = await connection.sendRawTransaction(transaction.serialize()); ``` The bypass is also explicitly documented in `SKILL.md:91-94`: ```javascript // Skip human confirmation (for automated agents) await sendSol(key, to, amount, { dryRun: false, skipConfirmation: true }); ``` ### Technical Analysis The purported human-confirmation control is only a Boolean condition controlled by the same caller requesting the transaction. Setting `skipConfirmation` to `true` disables the large-transfer rejection. It also suppresses the mainnet ...[truncated 1864 chars]- Remediation
View remediation
