T09 · Insecure Skill Coding Practices
- Location
generate_html.py:199- Finding
Stored HTML and JavaScript Injection in Generated News Reports
- Content
View full analysis
{ann_type}: {title}
{ann_date}''' ``` ```python html += f'''''' ``` ```python if analysis.get("ai"): html += f'''''' if analysis.get("hongmeng"): html += f'''🤖 AI行业分析
{analysis["ai"]}
''' caixun = analysis.get("caixun", {}) if caixun: html += '''📱 鸿蒙行业分析
{analysis["hongmeng"]}
🏢 彩讯股份(300634)分析研判
''' if caixun.get("opportunities"): html += '🎯 机遇
- '
for item in caixun.get("opportunities", []):
html += f'
- {item} ' html += '
⚠️ 风险
- '
for item in caixun.get("risks", []):
html += f'
- {item} ' html += '
💼 投资建议
- '
for item in caixun.get("recommendations", []):
html += f'
- {item} ' html += '
- Remediation
View remediation
``` 6. Add tests containing hostile values such as closing tags, quoted attribute payloads, event handlers, and dangerous URL schemes. Verify that all payloads are rendered as inert text or rejected. ]]>
