T09 · Insecure Skill Coding Practices
- Location
scripts/pipl-audit.py:349- Finding
Unsanitized Cloud-Controlled Content in HTML Reports and Terminal Output
- Content
View full analysis
").strip().lower() ``` Cloud response fields are also interpolated directly into an HTML document: ```python def render_html(data, items): s = data score = s.get("score", 0) color = "#4caf50" if score >= 80 else "#ff9800" if score >= 60 else "#f44336" rows = "" sev_cls = {"critical": "#dc2626", "high": "#ea580c", "medium": "#ca8a04", "low": "#16a34a"} sev_label = {"critical": "严重", "high": "高", "medium": "中", "low": "低"} current_cat = "" for r in items: if r.get("category") != current_cat: current_cat = r.get("category", "") rows += f'{current_cat}\n' icon = "✅" if r.get("passed") else "❌" cls = "pass" if r.get("passed") else "fail" sev = r.get("severity") or "" sev_badge = "" if sev: color = sev_cls.get(sev, "#64748b") sev_badge = f'{sev_label.get(sev, sev)}' rec = r.get("recommendation") or "Keep it up" ...[truncated 3193 chars]- Remediation
View remediation
``` Avoid inline executable scripts so that `script-src 'none'` remains effective. 6. Add regression tests using payloads containing `
