T09 · Insecure Skill Coding Practices
- Location
scripts/generate_report.py:42- Finding
Stored HTML and JavaScript Injection in Generated Reports
- Content
View full analysis
{title} ``` ```python🎂``` ```python for group_name, items in recipe["ingredients"].items(): html += f"""{title}
{description or 'Professional cake baking instruction'}
{category}{group_name}
""" for item in items: name = item.get("name", "") amount = item.get("amount", "") html += f"""{name} {amount}""" ``` ```python for i, step in enumerate(steps, 1): step_time = step.get('time', '') step_alert = step.get('alert', '') html += f"""Step {i}: {step.get(' ...[truncated 3913 chars]- Remediation
View remediation
` elements. - Event handlers such as ``. - Closing tags and malformed markup. - Quotes, ampersands, and angle brackets. - Payloads in every supported report field. 5. If reports are hosted, serve them from an isolated origin with no authenticated application state. Apply a restrictive Content Security Policy, for example one that disallows inline scripts and remote resources. 6. Remove the inline `onclick` handlers from the generated document so a strict Content Security Policy can be adopted without allowing `unsafe-inline`. ]]>
