T09 · Insecure Skill Coding Practices
- Location
BRAIN_ARCHITECTURE.md:317- Finding
Context-Unaware Template Substitution Enables HTML and JSON-LD Injection
- Content
View full analysis
str: """Replace ALL {PLACEHOLDER} text with actual values.""" return template_text.format(**variables) ``` ```text Rules: - Every {PLACEHOLDER} in the template must be replaced — no placeholder may survive into output - If a variable is missing from the dictionary → flag it, ask the user for the value, do not output {PLACEHOLDER} text - Schema variables ({SCHEMA_*}) are substituted in the same pass ``` Representative sinks from `TEMPLATES/product_new_template.md:7-28`: ```html {TITLE} — {DESCRIPTION} ``` Representative body and URL sinks from `TEMPLATES/product_new_template.md:35-88`: ```html{H1_TITLE_BRAND_PRODUCT_KEYWORD}
{HERO_SUBHEADLINE_TECHNICAL_BENEFITS} — Perfect for {TARGET_USE_CASES}
{DISPLAY_PRICE_EUR} / unit{H2_DESCRIPTION_OVERVIEW_FEATURES}
{DESCRIPTION_CONTENT_400_CHARS_MAX}
...[truncated 2942 chars]
- Remediation
View remediation
