T09 · Insecure Skill Coding Practices
- Location
static/index.html:154- Finding
DOM-Based Cross-Site Scripting Through Unescaped AI and Market Data
- Content
View full analysis
$1') .replace(/\n- /g, '
• ') .replace(/\n\n/g, '
') .replace(/\n/g, '
'); return html; } ``` ```javascript tbody.innerHTML = data.stocks.map(s => ` $${s.ticker} ${formatPrice(s.price)} ${formatChange(s.week_change_pct)} ${formatMCap(s.market_cap)} ${s.pe_ratio ? s.pe_ratio.toFixed(1) : 'N/A'} ${s.beta ? s.beta.toFixed(2) : 'N/A'} ${s.mentions} ${s.recommendation} `).join(''); ``` ```javascript if (data.analysis) { document.getElementById('analysis-content').innerHTML = renderMarkdown(data.analysis); document.getElementById('analysis-section').classList.remove('hidden'); document.getElementById('analysis-section').scrollIntoView({ behavior: 'smooth', block: 'center' }); } ``` ```javascript document.getElementById('euro-body').innerHTML ...[truncated 2174 chars]- Remediation
View remediation
` and verify that they are displayed only as inert text. ]]>
