T09 · Insecure Skill Coding Practices
- Location
scripts/fetch-with-aging.js:25- Finding
GraphQL Injection Through an Unvalidated Gotchi Identifier
- Content
View full analysis
- Remediation
View remediation
'); process.exit(1); } ``` 2. Enforce a reasonable numeric range and reject values that cannot be represented safely. 3. Use GraphQL variables rather than constructing the document with interpolation: ```js const query = ` query GetAavegotchi($id: ID!) { aavegotchi(id: $id) { id name createdAt claimedAt hauntId baseRarityScore modifiedRarityScore } } `; const data = JSON.stringify({ query, variables: { id: gotchiId } }); ``` 4. Add request timeouts, response-size limits, HTTP status validation, and GraphQL error handling to reduce denial-of-service exposure. ]]>
