T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:107
- Finding
- Credentials and Sensitive Data Can Be Sent to an Untrusted Configurable Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:27`, `SKILL.md:72`, `SKILL.md:107-110`, `SKILL.md:193-194`, `SKILL.md:225-228`, and `SKILL.md:312-320` **Vulnerability Type**: Unrestricted credential transmission **Risk Level**: High ### Vulnerable Code ```markdown - `CLAWZONE_URL` — Platform base URL (e.g. `https://clawzone.space`). ``` ```markdown Base: `${CLAWZONE_URL}/api/v1`. Auth header: `-H "Authorization: Bearer ${CLAWZONE_API_KEY}"`. ``` ```bash curl -s -X POST "${CLAWZONE_URL}/api/v1/matchmaking/join" \ -H "Authorization: Bearer ${CLAWZONE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"game_id": "GAME_ID"}' | jq '.' ``` ```bash curl -s "${CLAWZONE_URL}/api/v1/matches/MATCH_ID/state" \ -H "Authorization: Bearer ${CLAWZONE_API_KEY}" | jq '.' ``` ```bash curl -s -X POST "${CLAWZONE_URL}/api/v1/matches/MATCH_ID/actions" \ -H "Authorization: Bearer ${CLAWZONE_API_KEY}" \ -H "Content-Type: application/json" \ -d "$ACTION" | jq '.' ``` ```bash # Step 1: Create a user account curl -s -X POST "${CLAWZONE_URL}/api/v1/auth/register" \ -H "Content-Type: application/json" \ -d '{"username": "my-user", "password": "mypassword"}' | jq '.' # Save session_token from response # Step 2: Create an agent under the account curl -s -X POST "${CLAWZONE_URL}/api/v1/auth/agents" \ -H "Authorization: Bearer SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "my-agent", "framework": "openclaw"}' | jq '.' ``` ### Technical Analysis The Skill uses the environment-controlled `CLAWZONE_URL` as the destination for requests containing an API key, a session token, registration credentials, private match state, and player actions. The URL is necessary to communicate with ClawZone, but the instructions impose no origin allowlist, HTTPS requirement, normalized-host validation, or confirmation step for nonstandard endpoints. Consequently, possession or influence over `CLAWZONE_URL` is sufficient to redirect sensitiv ...[truncated 1825 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Default to the canonical ClawZone HTTPS origin and allowlist its normalized scheme, hostname, and port. 2. Reject HTTP, embedded URL credentials, unexpected ports, IP literals, malformed origins, and redirect targets outside the approved origin. 3. Require explicit user confirmation before sending credentials to any custom deployment. 4. Bind each API key to the origin for which it was issued and never reuse credentials across origins. 5. Use `curl --proto '=https' --proto-redir '=https'` and restrict redirects with an approved-host policy. 6. Avoid placing sample plaintext passwords in executable examples. Prompt securely for credentials or read them from protected secret storage. 7. Redact credentials and tokens from logs, command summaries, cron events, and user-visible error reports. 8. Document credential rotation and immediate revocation procedures for suspected endpoint misconfiguration. ]]>
