T09 · Insecure Skill Coding Practices
Error
- Location
- docker-compose.yml:49
- Finding
- Hardcoded Vexa, Zoom OAuth, Database, and Transcription Credentials<![CDATA[ ## Vulnerability Details **File Location**: `config.json:42-45`, `docker-compose.yml:5-8`, `docker-compose.yml:49-58`, `docs/setup.md:44-62`, `docs/setup.md:147-150`, `docs/agent-usage.md:191-192`, `docs/troubleshooting.md:174-184` **Vulnerability Type**: Hardcoded reusable credentials **Risk Level**: Critical ### Vulnerable Code `config.json:42-45`: ```json "bot": { "vexa_url": "http://localhost:8056", "vexa_api_key": "dGosC39FSoaw0UpIVdhroaz42heFR0ou4bC5yiIc", "bot_name": "OpenClaw 助手", ``` `docker-compose.yml:5-8`: ```yaml environment: - POSTGRES_USER=vexa - POSTGRES_PASSWORD=vexa_pass - POSTGRES_DB=vexa ``` `docker-compose.yml:49-58`: ```yaml environment: - DATABASE_URL=postgresql://vexa:vexa_pass@postgres:5432/vexa - ADMIN_API_TOKEN=openclaw-meeting-bot - TRANSCRIPTION_ENABLED=true - TRANSCRIBER_URL=http://whisper-proxy:8000/v1/audio/transcriptions - REMOTE_TRANSCRIBER_URL=http://whisper-proxy:8000/v1/audio/transcriptions - TRANSCRIBER_API_KEY=openclaw-key - REMOTE_TRANSCRIBER_API_KEY=openclaw-key - ZOOM_CLIENT_ID=YZXafYz5STiVV3qbh2Sh0w - ZOOM_CLIENT_SECRET=IlvPhToAqWorTeW3qLLNUTnF9I1ItxUs ``` The Vexa user token and static administrative token are also reproduced in documentation and diagnostic commands. ### Technical Analysis The project commits several reusable secrets directly to source-controlled configuration and documentation: - A Vexa user API token - A Vexa administrative API token - A Zoom OAuth client ID and client secret - PostgreSQL credentials - Transcription API keys Hardcoded secrets cannot be independently controlled per installation and are exposed to every person or system that receives a copy of the project. Removing them from the current files is insufficient if they remain in repository history, build artifacts, logs, or documentation caches. The administrative and user tokens have different privilege scopes, but both are published. The administrative token may permit management of V ...[truncated 1611 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Immediately revoke and rotate the exposed Vexa user token, administrative token, Zoom client secret, database password, and transcription keys. 2. Remove all literal credentials from configuration, examples, troubleshooting commands, and repository history. 3. Load secrets from environment variables, Docker secrets, or an operating-system secret manager. For example: ```yaml environment: DATABASE_URL: ${DATABASE_URL:?DATABASE_URL is required} ADMIN_API_TOKEN: ${VEXA_ADMIN_API_TOKEN:?VEXA_ADMIN_API_TOKEN is required} ZOOM_CLIENT_ID: ${ZOOM_CLIENT_ID:?ZOOM_CLIENT_ID is required} ZOOM_CLIENT_SECRET: ${ZOOM_CLIENT_SECRET:?ZOOM_CLIENT_SECRET is required} ``` 4. Supply a sanitized `.env.example` containing placeholders only, and exclude real `.env` files from version control. 5. Generate unique, high-entropy credentials for every deployment rather than shipping universal defaults. 6. Restrict administrative credentials to administrative workflows; never reuse them for normal bot API calls. 7. Add automated secret scanning to CI and pre-commit checks. 8. Review Vexa and Zoom access logs for use of the exposed values and invalidate any tokens created through unauthorized administrative access. ]]>
