T09 · Insecure Skill Coding Practices
- Location
scripts/casino.js:14- Finding
Unvalidated Remote Transaction Data Can Induce Malicious Real-Money Transactions
- Content
View full analysis
{ console.log(` ${i + 1}. ${tx.description}`); console.log(` to: ${tx.to}`); console.log(` data: ${tx.data}`); }); break; } case 'withdraw': { if (!amount) { console.error('--amount required'); process.exit(1); } const d = await request('POST', '/withdraw', { amount }); console.log(`${d.transaction.description}`); console.log(` to: ${d.transaction.to}`); console.log(` data: ${d.transaction.data}`); break; } ``` The documented workflow encourages signing the returned data: ```text 1. Deposit: POST /deposit → sign & send approve + deposit txs 2. Create: POST /create → sign & send createGame tx (save salt!) ``` ### Technical Analysis The remote service controls the transaction destination and calldata displayed to the ...[truncated 2204 chars]- Remediation
View remediation
