T09 · Insecure Skill Coding Practices
- Location
skill.md:16- Finding
Read/Write API Token Collected Through Chat and Stored in Plaintext Configuration
- Content
View full analysis
"` - (this maps to env var `SANSFICTION_TOKEN`) - Or set: - `skills.entries.sansfiction-library.env.SANSFICTION_TOKEN: ""` If you can’t edit config automatically, give the user the exact snippet to paste. ``` ### Technical Analysis The setup procedure explicitly instructs the agent to ask the user to paste a read/write bearer token into the conversation. This contradicts the skill's own rule not to write the token into chat logs. A token supplied as a chat message may be retained in conversation history, agent state, telemetry, backups, exports, or other logging systems. The skill also recommends persisting the token directly in `~/.openclaw/openclaw.json`. No requirement is provided for restrictive file permissions, encryption at rest, a dedicated secret-management facility, token scoping, or token expiration. Consequently, any process or user able to read the conversation records or configuration file may recover the credential. Because the token is transmitted as a bearer credential, possession is sufficient to authenticate to the SansFiction MCP endpoint. No additional proof of identity is described. ### Attack Path 1. The `SANSFICTION_TOKEN` environment variable is absent. 2. The skill follows its setup procedure and asks the user to paste a personal token into the chat. 3. The user's token is retained in chat history, logs, telemetry, backups, or exported conversation data. 4. Alternatively, the tok ...[truncated 1074 chars]- Remediation
View remediation
