T09 · Insecure Skill Coding Practices
- Location
scripts/config.ts:9- Finding
Bearer API Credential Can Be Redirected to an Arbitrary Host
- Content
View full analysis
[k, String(v)]) ).toString(); if (qs) url += `?${qs}`; } else if (args.params) { (fetchOptions.headers as Record)["Content-Type"] = "application/json"; fetchOptions.body = JSON.stringify(args.params); } const res = await fetch(url, fetchOptions); ``` ```ts // plugin/index.ts:285-289 const res = await fetch(`${hubUrl}/api/openclaw/health`, { headers: { Authorization: `Bearer ${apiKey}`, Accept: "application/json", }, }); ``` ### Technical Analysis Both the CLI and plugin obtain a bearer credential and attach it to requests whose origin is controlled by configuration. The CLI trusts `ZYLA_HUB_URL`, while the plugin exposes `hubUrl` as an unrestricted string in its public configuration schema. ...[truncated 1788 chars]- Remediation
View remediation
