T09 · Insecure Skill Coding Practices
- Location
SKILL.md:273- Finding
API Key Solicitation and Unspecified Persistent Storage
- Content
View full analysis
Once you have the key, share it with me and I'll save it for future sessions. Then I can generate proxies for you anytime. ``` ### Technical Analysis The skill instructs the user to submit a raw TPN API key through the conversational interface and states that the agent will save it for future sessions. This conflicts with the skill's documented security posture, which says that `TPN_API_KEY` is injected by the OpenClaw runtime and only checked for existence. Chat messages, transcripts, telemetry, and agent memory are not appropriate secret-storage mechanisms. The instruction also fails to identify the storage backend, encryption controls, access policy, retention period, deletion procedure, or whether the credential could be exposed to other skills or sessions. Although the project does not contain executable code that implements persistence, the instruction itself directs the agent to perform insecure credential collection and storage. ### Attack Path 1. A user invokes the setup workflow without `TPN_API_KEY` configured. 2. The skill instructs the user to share the API key in the conversation. 3. The user submits the raw credential as a chat message. 4. The key becomes part of conversation history, logs, telemetry, or persistent agent memory. 5. Any actor or component with access to those records can recover the key. 6. The exposed key can be used to authenticate to the TPN API and consume the user's credits or create proxy leases. ### Impact Assessment An exposed API key could permit unauthorized use of the victim's TPN account within the permissions assigned to that key. Likely consequences include credit consumption, unauthorized proxy generation, activity attribution to the victim's account, and loss of account confidentiality. ...[truncated 237 chars]- Remediation
View remediation
