T09 · Insecure Skill Coding Practices
- Location
skill/api_server.py:374- Finding
Predictable Hardcoded Token Protects the Device-Control API
- Content
View full analysis
Dict[str, str]: return { "Content-Type": "application/json", "Authorization": f"Bearer {self.token}" } ``` The shipped configuration combines that credential with an all-interface bind: ```yaml server: host: "0.0.0.0" port: 8765 workers: 4 debug: false auth: token_env: "CLAWMOBILE_API_TOKEN" default_token: "clawmobile-secret-token-change-in-production" token_header: "Authorization" token_prefix: "Bearer" ``` ### Technical Analysis The generated AutoX.js server authenticates requests using a static bearer token embedded in the public source. The Python client and default configuration repeat the same value, so it cannot be treated as a secret. The generated server calls `server.listen(8765)` without restricting the listening address, while the configuration explicitly specifies `0.0.0.0`. Consequently, the device-control API may be reachable from other systems on the same network. Anyone who can read the repository or guess the documented placeholder can authenticate. This exceeds least privilege because a ...[truncated 1040 chars]- Remediation
View remediation
