T09 · Insecure Skill Coding Practices
- Location
scripts/crypto-cli.mjs:1220- Finding
The --private privacy restriction is bypassed by price and ENS helper operations
- Content
View full analysis
- Remediation
View remediation
rpc.tracking === "none"); } if (privateOnly && rpcs.length === 0) { throw new Error(`No private (tracking:none) RPCs configured for chain ${chainId}`); } return rpcs[0]?.url || null; } ``` 2. Forward `privateOnly` from `cmdPrice`: ```js const rpcUrl = await getRpcUrlForChain(chainId, privateOnly); const mainnetRpc = ETH_NATIVE_CHAINS.has(chainId) ? await getRpcUrlForChain(1, privateOnly) : null; ``` 3. Add a `privateOnly` parameter to `resolveENS` and `reverseENS`, and pass it into `getEvmClient("ethereum", privateOnly)`. 4. Propagate the flag from every command router call before ENS resolution. Avoid resolving ENS in a separate pre-command path that silently uses default provider selection. 5. Fail closed when `--private` is requested and no `tracking: "none"` endpoint is available. Do not silently fall back to another provider. 6. Add automated tests that intercept network requests and verify every documented `--private` command contacts only endpoints classified as `tracking: "none"`. ]]>
