T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:29
- Finding
- Configurable API Endpoint Can Redirect Credentials and Sensitive Data## Vulnerability Details **File Location**: `SKILL.md:29-32` (also repeated at `SKILL.md:37-40`, `SKILL.md:45-48`, and `SKILL.md:53-56`) **Vulnerability Type**: Unvalidated credential-bearing endpoint configuration **Risk Level**: High ```bash curl -s -X POST "$DASHTASK_ENDPOINT" \ -H "X-API-Key: $DASHTASK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"action": "get_org_context"}' ``` ### Technical Analysis The skill instructs the agent to send the DashTask API key through the `X-API-Key` header to the independently configurable `DASHTASK_ENDPOINT`. The documented request pattern does not enforce HTTPS, validate the destination hostname, restrict the endpoint to trusted DashTask infrastructure, or explicitly reject redirects. If the environment variable is compromised or incorrectly configured, the agent will transmit the API key and request payloads to that destination. Requests may also contain sensitive organizational, task, contact, lead, or CRM data. This is an insecure configuration pattern rather than evidence that the packaged skill intentionally exfiltrates data. ### Attack Path 1. An attacker obtains the ability to modify the agent's environment or OpenClaw configuration. 2. The attacker sets `DASHTASK_ENDPOINT` to an attacker-controlled URL. 3. The agent follows the skill instructions and executes a credential-bearing request. 4. The attacker's server receives the `X-API-Key` header and any submitted request data. 5. The attacker reuses the captured key against the legitimate DashTask API. 6. The attacker can perform operations permitted by the key's assigned scopes until the key is revoked or expires. ### Impact Assessment Successful exploitation discloses the DashTask API key. The resulting privileges are limited to the scopes assigned to that key, but may include reading or modifying tasks, projects, CRM leads, contacts, companies, activities, quotes, dimensions, tags, and settings. De ...[truncated 264 chars]
- Remediation
- ## Remediation Suggestions - Replace the unrestricted endpoint variable with a fixed, trusted HTTPS endpoint where possible. - If endpoint configurability is required, validate the URL before sending credentials: - Require the `https` scheme. - Allowlist approved DashTask or Supabase hostnames. - Reject embedded credentials, unexpected ports, IP literals, and malformed URLs. - Resolve and reject loopback, link-local, private-network, and metadata-service destinations where they are not explicitly required. - Disable HTTP redirects for credential-bearing requests or validate every redirect destination against the same allowlist. - Use a trusted, credential-aware HTTP integration instead of arbitrary shell-based requests. - Apply least privilege when generating API keys and issue separate keys for `tasks`, `crm`, and `settings` when practical. - Add endpoint verification to installation and startup checks. - Revoke and rotate the API key immediately if endpoint configuration is suspected to have been altered.
