T09 · Insecure Skill Coding Practices
- Location
scripts/generate-progress-report.sh:65- Finding
Unescaped Learner Data Enables HTML Injection in Progress Reports
- Content
View full analysis
= 75 else "#eab308" if pct >= 50 else "#ef4444" display_name = topic_name.replace("_", " ").title() topic_rows += f"""""" # Build quiz rows quiz_rows = "" for q in (quizzes[-10:] if quizzes else []): score = q.get("score_pct", 0) color = "#22c55e" if score >= 80 else "#eab308" if score >= 60 else "#ef4444" quiz_rows += f"""{display_name}{pct}%{q.get('date', 'N/A')} {q.get('topic', 'N/A').replace('_',' ').title()}- Remediation
View remediation
``` 4. Explicitly prevent Playwright from making network requests: ```python page.route( "**/*", lambda route: route.continue_() if route.request.url.startswith("file://") else route.abort() ) ``` 5. Prefer a templating system with automatic escaping rather than manually assembling HTML with f-strings. 6. Add regression tests containing payloads such as HTML tags, quote characters, external image references, and script elements. Confirm that they appear only as text and produce no network traffic. ]]>
