T09 · Insecure Skill Coding Practices
- Location
scripts/generate_report.py:442- Finding
Stored HTML Injection in Generated Ranking Reports
- Content
View full analysis
{rank} {account_name} {category} {score} {followers} {new_fans} {new_likes} {new_comments} {new_shares} """ ROW_TEMPLATE = """ {rank} {account_name} {score} {followers} {new_fans} {new_likes} {new_comments} {new_shares} """ ``` The templates are populated without escaping: ```python account_name = item.get('accountName', '') profile_url = item.get('profileUrl', '') rows.append(ROW_TEMPLATE.format( rank_class=rank_class, rank=rank, account_name=account_name, profile_url=profile_url or '#', score=score, followers=followers, new_fans=new_fans, new_likes=new_likes, new_comments=new_comments, new_shares=new_shares, )) ``` The resulting content is then written as an HTML document: ```python with open(output_path, "w", encoding="utf-8") as f: f.write(html) ``` ### Technical Analy ...[truncated 2297 chars]- Remediation
View remediation
