T09 · Insecure Skill Coding Practices
- Location
scripts/report_html.py:348- Finding
Stored HTML and JavaScript Injection in Generated Reports
- Content
View full analysis
Review Analysis Report - {asin} ``` ```pythonSummary: {summary}... {"".join([f'''{d.get('status', '❓')}{d.get('name', d.get('name_zh', ''))}{d.get('score', 0):.0f}/100{d.get('detail', d.get('detail_zh', ''))}''' for d in dimensions])} ``` ```python // SuspiciousReview const suspicious = {suspicious_json}; const container = document.getElementById('suspiciousReviews'); if (suspicious.length === 0) {{ container.innerHTML = 'No highly suspicious reviews detected.
'; }} else {{ suspicious.slice(0, 5).forEach((review, index) => {{ container.innerHTML += `#${{index + 1}} Risk: ${{review.risk_score?.toFixed(0) || 'N/A'}}%"${{review.content}}"Reasons: ${{(review.reasons || review.reasons_zh || [] ...[truncated 2273 chars]- Remediation
View remediation
", "\\u003e") .replace("&", "\\u0026") ) ``` A safer design is to place JSON in a non-executable ``, ``, quotes, ampersands, and Unicode edge cases. ]]>
