T09 · Insecure Skill Coding Practices
- Location
scripts/lib/usdc.js:91- Finding
Nonexistent Escrow Is Presented as an Active Payment Safeguard
- Content
View full analysis
0 && this.wallet) { try { const balance = await this.getBalance(this.wallet.address); if (balance < upfrontAmount) { result.status = 'INSUFFICIENT_FUNDS'; result.reason = `Need ${upfrontAmount} USDC but only have ${balance} USDC`; return result; } const tx = await this.transfer(toAddress, upfrontAmount); result.transactions.push({ type: 'upfront', ...tx }); } catch (err) { result.status = 'TX_FAILED'; result.reason = err.message; return result; } } if (escrowAmount > 0) { result.escrowNote = `${escrowAmount} USDC held in escrow. Release with: scout release --to ${toAddress} --amount ${escrowAmount}`; } return result; ``` ### Technical Analysis The function calculates an `escrowAmount` but does not transfer that amount to an escrow contract, multisignature wallet, custodial address, or any other controlled mechanism. It merely records a number in the returned object. Despite the absence of an escrow transaction, the function states that the amount is “held in escrow” and provides a `scout release` command. No corresponding release command or e ...[truncated 1489 chars]- Remediation
View remediation
