T09 · Insecure Skill Coding Practices
- Location
scripts/generate_report.py:81- Finding
Unescaped Report Data Enables HTML Injection and Server-Side Resource Requests
- Content
View full analysis
{i+1}{t.get('name','')}{t.get('description','')}" for i, t in enumerate(tech_framework) ) top_patents = data.get("top_patents", []) patent_rows = "" for p in top_patents: layout_type = p.get("layout_type", "外围") badge_cls = "badge-core" if layout_type == "核心" else "badge-periph" patent_rows += ( f"" f"{p.get('title', '')}" f"{p.get('publication_number', '')}" f"{p.get('family_size', '-')}" f"{p.get('tech_sub_area', '-')}" f"{layout_type}" f"{p.get('claim_summary', '')[:120]}…" f"" ) suggestions = data.get("suggestions", []) sug_items = "".join(f"- {s}
" for s in suggestions) sources = data.get("sources", []) src_items = "".join(f"- {s}
" for s in sources) ``` The generated fragments and other JSON fields are then inserted directly into the report: ```python html = f""" {competitor} · {technology} 专利布局策略分析 {STYLE}竞争对手专利布局策略分析报告
竞争对手:{competitor} | 技术领域:{technology} | 市场范围:{market_scope} | 检索专利总数:{total_patents} 件 | 生成时间:{generated_at}
{low_data_warn}① 执行摘要
{exec_summary}② 技术框架
#技术子方向< ...[truncated 3818 chars]- Remediation
View remediation
link ``` Test ...[truncated 85 chars]
