T09 · Insecure Skill Coding Practices
Warning
- Location
scripts/build_incident_dossier.js:25- Finding
Unescaped Markdown and HTML Injection in Generated Incident Reports
- Content
View full analysis
`${k} (${v})`).join(', ') || 'none'}`, ''); lines.push('## Evidence'); for (const item of evidence) lines.push(`- ${item.path} — ${item.kind}`); lines.push('', '## Timeline'); if (!events.length) lines.push('- No structured events extracted.'); else for (const e of events.slice(0, 50)) lines.push(`- ${e.ts ?? 'no-ts'} · ${e.kind} · ${e.job_id ?? 'no-job-id'} · ${path.basename(e.source)}`); ``` ### Technical Analysis The script extracts `ts`, `kind`, and `job_id` values from user-selected JSON or JSONL evidence and interpolates them directly into a Markdown report. Input paths are also written to the report without escaping. The affected values can contain line breaks, Markdown syntax, links, images, or raw HTML. Because the script does not normalize or escape these constructs, malicious evidence can alter the structure and rendered meaning of the generated dossier. The effect depends on the Markdown renderer used to open the report. A renderer that permits raw HTML or loads remote images may display attacker-controlled content or initiate remote-resource requests. Even a restrictive renderer may display fabricated headings, timelines, links, or recommendations. ### Attack Path 1. An attacker supplies or modifies an operational JSON or JSONL artifact that an analyst is expected to investigate. 2. The attacker places Markdown or HTML content in a recognized field such as `status`, `eve ...[truncated 1542 chars]- Remediation
View remediation
