T09 · Insecure Skill Coding Practices
- Location
scripts/render_preview.js:141- Finding
Stored Cross-Site Scripting in Generated Preview HTML
- Content
View full analysis
${escapeHtml(component.text)}`; } ``` The same file also inserts decoded dataset values into `innerHTML`: ```javascript function showTooltip(event, element) { const data = element.dataset; tooltip.hidden = false; tooltip.innerHTML = "" + (data.componentLabel || data.componentId) + "" + (data.componentTypeLabel || data.componentType) + (data.componentRole ? " · " + data.componentRole : "") + ""; const offset = 16; tooltip.style.left = event.clientX + offset + "px"; tooltip.style.top = event.clientY + offset + "px"; } ``` Validation does not constrain or sanitize the style object: ```javascript style: { type: "object" } ``` ### Technical Analysis Deck data is treated ...[truncated 2942 chars]- Remediation
View remediation
