T09 · Insecure Skill Coding Practices
- Location
scripts/enhanced_report_generator.py:410- Finding
Stored HTML and JavaScript Injection in Enhanced Reports
- Content
View full analysis
📄 Page Analysis: {page_analysis.get('title', 'Unknown')}
Purpose: {page_analysis.get('purpose', 'Not analyzed')}
Navigation: {', '.join(page_analysis.get('navigation', ['None found']))}
""" ``` ```python if observations_list: notes = '; '.join(str(o) for o in observations_list) elif raw_response: notes = f"Response: {raw_response}" elif error_msg: notes = f"Error: {error_msg}" action = step.get('action') or step.get('prompt', '') or 'No action' rationale = step.get('rationale') or step.get('expected_outcome', '') html += f"""""" ``` ```python html += f""" 📹 Recording {global_recording_index}: {display_name} """ ``` ### Technical Analysis The report generator directly interpolates website-derived page titles, navigation text, Nova Act responses, errors, persona fields, test cases, and trace paths into HTML. It does not apply HTML escaping, attribute escaping, URI-scheme validation, or sanitization. These values cross an untrusted-data boundary because they may originate from an attacker-controlled website or crafted results/persona file. An injected value such as an image element with an event handler will become active markup when the ...[truncated 871 chars]Step {step_num + 1}: {action_display}{f'Expected: {rationale}' if rationale else ''}{"⚠️ " if is_issue else ""}Observation: {notes}- Remediation
View remediation
