T09 · Insecure Skill Coding Practices
- Location
src/evaluate.ts:235- Finding
Unvalidated Remote Ranking Data Silently Modifies User Inventory
- Content
View full analysis
x.speciesId === p.speciesId && x.league === p.league && x.iv[0] === p.iv[0] && x.iv[1] === p.iv[1] && x.iv[2] === p.iv[2] ); if (idx >= 0) { allP[idx].moves = movesToSave; allP[idx].updatedAt = new Date().toISOString(); fs.writeFileSync(DATA_FILE, JSON.stringify(allP, null, 2), 'utf-8'); } } ``` ### Technical Analysis The application downloads ranking and gamemaster JSON from fixed GitHub Raw URLs and accepts each response solely on the basis that it is syntactically valid JSON. The TypeScript assertion `as PvPokePokemon[]` does not perform runtime validation. There are no checks for the expected top-level structure, required properties, value types, numeric ranges, string lengths, allowable move identifiers, ...[truncated 2413 chars]- Remediation
View remediation
