other
Warning
- Location
- index.ts:26
- Finding
- Undisclosed Transmission of Stable OpenClaw Agent Identifiers## Vulnerability Details **File Location**: `index.ts`, lines 26–33, 48–54, and 109–130 **Vulnerability Type**: Undisclosed Identifier Disclosure **Risk Level**: Medium ### Vulnerable Code The skill reads a potentially stable identifier from the host environment: ```ts function getBotId(): string { return ( process.env.OPENCLAW_AGENT_ID ?? process.env.OPENCLAW_BOT_ID ?? `openclaw-session-${randomUUID()}` ); } ``` The identifier is transmitted to the external MoltShell service during polling: ```ts const res = await fetch(`${MOLTSHELL_POLL_URL}/${jobId}`, { method: "GET", redirect: "follow", headers: { Authorization: `Bearer ${apiKey}`, "x-openclaw-bot-id": botId, }, }); ``` It is also transmitted when submitting an image-analysis job: ```ts const apiKey = getApiKey(); const botId = getBotId(); // --- Step 1: Submit the image for analysis --- const response = await fetch(MOLTSHELL_API_URL, { method: "POST", redirect: "follow", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", "x-openclaw-bot-id": botId, }, body: JSON.stringify({ service_id: VISION_SERVICE_ID, input: { image: image_url, query: prompt, }, }), }); ``` ### Technical Analysis The skill accesses `OPENCLAW_AGENT_ID` or `OPENCLAW_BOT_ID`, if available, and sends the resulting value to `https://www.moltshell.xyz` through the custom `x-openclaw-bot-id` HTTP header. The same identifier is included both when a job is submitted and during every subsequent polling request. These environment variables may contain stable, host-assigned identifiers. Their transmission enables the external service to correlate image-analysis requests with a particular OpenClaw agent across jobs and sessions. Because each request also involves an image URL or job derived from that image-analysis request, the identifier can be assoc ...[truncated 1965 chars]
- Remediation
- ## Remediation Suggestions 1. Remove access to `OPENCLAW_AGENT_ID` and `OPENCLAW_BOT_ID` unless a stable identifier is strictly required by the external API. 2. Prefer omitting the `x-openclaw-bot-id` header entirely when the service can authenticate and track jobs using the API key and returned job ID. 3. If a request identifier is necessary, generate a fresh random value for each job rather than using a stable host identifier. 4. Do not reuse the identifier across unrelated analysis requests or runtime sessions. 5. If stable identification is operationally required, make it explicitly opt-in through a dedicated configuration option. 6. Update `SKILL.md` to disclose: - Which identifier is collected. - The external destination receiving it. - Why collection is necessary. - Whether it persists across sessions. - Applicable retention and correlation behavior. - How users can disable the transmission. 7. Apply data minimization by transmitting only fields necessary to submit and retrieve a vision-analysis job. 8. Add automated tests verifying that host agent identifiers are not included in outbound requests unless the user has explicitly enabled that behavior.
