T09 · Insecure Skill Coding Practices
- Location
scripts/wechat-creator.js:6- Finding
Configurable API Origin Can Exfiltrate the Bearer Token and User Article Materials
- Content
View full analysis
({})); if (!response.ok || body.code !== 1000) { const error = new Error(body.message || `Pixmind API request failed (${response.status})`); error.code = body.code || `HTTP_${response.status}`; error.status = response.status; throw error; } return body.data; } ``` The CLI reads the API key and optional local material, then transmits the material in the project brief: ```js const apiKey = process.env.PIXMIND_API_KEY; if (!apiKey) throw Object.assign(new Error('This external-host CLI requires PIXMIND_API_KEY in its process environment. In Pixmind Builder, use pixmind_api_request with the key saved under Settings → Providers → Pixmind instead of running this script.'), { code: 'MISSING_API_KEY' }); if (!options.projectId && !options.topic) throw new Error('--topic or --project-id is required'); const requestId = String(options.requestId || `wechat-${randomUUID()}`); const materials = options.materialFile ? [await readFile(options.materialFile, 'utf8')] : []; let project = options.projectId ? await request(`/api-platform/v1/content/projects/${encodeURIComponent(options.projectId)}`, ...[truncated 3181 chars]- Remediation
View remediation
