T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:73
- Finding
- Wallet Funding and Automation Are Recommended Without Auditable Security Controls<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:73-88`, `SKILL.md:167-174` **Vulnerability Type**: Unverifiable wallet security controls **Risk Level**: High ### Vulnerable Code Snippet ```markdown ### 3. Create Agent Wallet Profile ```bash npm run setup ``` This opens a browser where you: - Install/setup your chosen wallet extension - Create a NEW wallet (fresh seed phrase) - The profile is saved for future automation ### 4. Fund the Wallet Transfer a small amount to your agent wallet: - Native token for gas (0.01-0.05 ETH/SOL recommended) - Tokens for operations (start small, e.g., $50 USDC) ``` The document later asserts that security controls are enforced: ```markdown ## Safety - **Isolated Profile:** Agent uses separate browser profile - **Separate Wallet:** Completely separate from your main wallet - **Spend Caps:** Hard limits prevent runaway spending - **Protocol Allowlist:** Only whitelisted contracts can be called - **Full Logging:** Every transaction is logged - **Revocation:** Set `"revoked": true` to disable all actions ``` ### Technical Analysis The submitted project contains only `SKILL.md`. It does not include the referenced `package.json`, setup script, wallet adapters, permission guard, configuration loader, transaction logger, tests, or other source files shown in the documented architecture. As a result, the following security properties cannot be verified: - Enforcement of per-transaction and daily spending limits. - Contract and chain allowlist validation. - User-approval thresholds. - Revocation behavior. - Isolation of the browser profile and wallet. - Safe handling of seed phrases and extension credentials. - Validation of recipients, transaction calldata, and message-signing requests. - Transaction logging and protection of those logs. The documentation invites users to create and fund a wallet while relying on controls that are absent from the submitted artifact. This is especially security-sensitive becau ...[truncated 1789 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include the complete implementation referenced by the documentation: - `package.json` and a pinned lockfile. - Setup and execution scripts. - Browser-profile management. - Wallet adapters. - Permission enforcement and configuration parsing. - Transaction logging and price-estimation logic. - Automated security tests. 2. Enforce policies in a trusted transaction-validation layer immediately before signing, rather than only through browser-interface checks. 3. Default to denial when configuration is missing, malformed, stale, or cannot be evaluated. 4. Resolve and validate the chain ID, recipient, contract address, function selector, calldata, token amount, token decimals, and estimated fiat value before every signature. 5. Require explicit user confirmation for: - Arbitrary message and typed-data signing. - Token approvals and permit signatures. - Unknown contracts or recipients. - Transactions above a conservative threshold. - Blind-signing requests or undecodable calldata. 6. Store the wallet in an isolated browser profile with restrictive file permissions. Never log seed phrases, private keys, passwords, or complete sensitive signing payloads. 7. Implement tamper-resistant accounting for daily and per-transaction limits and test concurrency, restart, decimal-conversion, price-oracle, and multi-chain bypass cases. 8. Add integration tests proving that revocation, allowlists, blocked methods, approval thresholds, and spending caps fail closed. 9. Clearly state that users must not fund the wallet until the exact implementation and its dependencies have been independently reviewed. ]]>
