T09 · Insecure Skill Coding Practices
- Location
scripts/identity.ts:14- Finding
Unrestricted Avatar Paths Permit Arbitrary Local File Disclosure to External Image Providers
- Content
View full analysis
= { ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".png": "image/png", ".webp": "image/webp", }; const mimeType = mimeMap[ext] || "image/jpeg"; const data = fs.readFileSync(filePath).toString("base64"); return { data, mimeType }; } ``` ```ts for (const imgPath of referenceImages) { const { data, mimeType } = readImageAsBase64(imgPath); parts.push({ inlineData: { data, mimeType }, }); } ``` The laozhang.ai provider ...[truncated 3550 chars]- Remediation
View remediation
