T09 · Insecure Skill Coding Practices
- Location
scripts/test_okx.sh:53- Finding
Hardcoded Third-Party Wallet Address in Swap Transaction Generation
- Content
View full analysis
- Remediation
View remediation
&2 exit 1 fi ``` 3. URL-encode all user-controlled query parameters rather than interpolating them directly into the request URL. 4. Display the wallet address, token pair, amount, chain, and slippage before requesting or presenting transaction data. 5. Require explicit user confirmation before transaction generation when the script is used interactively. 6. Clearly label `scripts/test_okx.sh` as test-only and warn that returned calldata must be independently decoded and verified before signing. 7. Add an assertion that the wallet represented in the generated transaction context matches the user-provided wallet whenever the API response exposes sufficient information. 8. Ensure `_meta.json` accurately lists all distributed executable files, including `scripts/test_okx.sh`, so reviewers and package users are aware of the script. ]]>
