T09 · Insecure Skill Coding Practices
- Location
references/install.md:99- Finding
Long-Lived Bearer Token Exposed Through CLI Arguments and Persistent MCP Configuration
- Content
View full analysis
" }, "connectionTimeoutMs": 180000, "timeoutMs": 180000 }' ``` From `references/onboarding.md:155-167`: ```bash openclaw mcp set creator-skill-v2 '{ "url": "{SKILL_API_BASE_URL}/mcp", "transport": "streamable-http", "headers": { "Authorization": "Bearer " }, "connectionTimeoutMs": 180000, "timeoutMs": 180000 }' ``` From `references/openclaw-tui-prompt.txt:119-135`: ```text 9. `POST /api/v1/tokens`, body: `{"name":"openclaw-onboarding"}` → save `sk_live_` 10. Immediately search through MCP: - Header: `Authorization: Bearer ` 12. Asynchronously run `openclaw mcp set creator-skill-v2` with Bearer `sk_live_`. ``` ### Technical Analysis The documented workflow creates an `sk_live_` bearer token and places the literal credential inside an `openclaw mcp set` command. The installation documentation also permits tokens with an expiration period of 365 days. Supplying a secret directly in a command argument can expose it through: - Interactive shell history. - Process-command-line inspection while the command is running. - Terminal session recordings. - Debug or audit logs that capture executed commands. - Automation logs or error reports. - Copy-and-paste records and command transcripts. The command also appears to persist the authorization header as part of the MCP server configuration. Unless OpenClaw encrypts or externally references this value, the bearer token may remain as plaintext in a local configuration file. The ...[truncated 1694 chars]- Remediation
View remediation
