T09 · Insecure Skill Coding Practices
- Location
scripts/video_gen.js:207- Finding
Arbitrary Local File Read and Upload Through Image Parameters
- Content
View full analysis
controller.abort(), 60_000); let res; try { res = await fetch(MODELS_BASE_URL + UPLOAD_API_PATH, { method: 'POST', headers: { Authorization: `Bearer ${apiKey}`, }, body: form, signal: controller.signal, }); } catch (err) { clearTimeout(timer); if (err.name === 'AbortError') { throw new Error(`Upload timeout: ${filePath}`); } throw err; } clearTimeout(timer); ``` ```js async function ensurePublicImageUrl(value, apiKey) { if (typeof value !== 'string' || !value ...[truncated 3044 chars]- Remediation
View remediation
