T09 · Insecure Skill Coding Practices
- Location
scripts/generate_worksheet.py:489- Finding
Unescaped User Input Enables HTML and JavaScript Injection in Generated Worksheets
- Content
View full analysis
{q["level"]}' if len({x["level"] for x in qs}) > 1 else "" cells.append(f'{q["no"]}.{lvtag}{q["prompt"]}') out.append( f'' f' " ) if with_answers: items = "".join( f'' f'{title}' f'{subtitle}' f'姓名:{name}日期:用时:' f'做对:题{"".join(cells)}' f'幼儿园数学练习 · {title}' f"第 {pi + 1} 页 / 共 {total_pages} 页" f"{q["no"]}. {q ...[truncated 3480 chars]- Remediation
View remediation
&"'``` Tests should verify that the resulting document contains encoded text such as `<script>`, not executable elements. 6. Consider adding a restrictive Content Security Policy as defense in depth. Escaping remains mandatory because a policy alone does not prevent all markup injection or content manipulation. ]]>
