T01 · Skill Instruction Hijacking
- Location
scripts/auto-remediate.py:281- Finding
Forced Promotional Content Injection Through Automatic CTA Remediation
- Content
View full analysis
tuple[str, dict[str, Any]]: """Append CTA if not already present.""" type_key = content_type if content_type in cta_templates else "general" tmpl = cta_templates[type_key] detection_signals = tmpl.get("detection_signals", []) already_present = any( re.search(re.escape(signal), content, re.IGNORECASE) for signal in detection_signals ) if already_present: return content, { "issue_type": issue["issue_type"], "original_text": issue.get("original_text", ""), "fixed_text": "(CTA already present — skipped)", "auto_fixed": True, "reason": "CTA signal detected in content — no injection needed.", "action": "skipped", } cta_variant = variant if variant in tmpl else "default" cta_text = tmpl[cta_variant] fixed_content = content.rstrip() + cta_text return fixed_content, { "issue_type": issue["issue_type"], "original_text": issue.get("original_text", ""), "fixed_text": cta_text.strip(), "auto_fixed": True, "reason": f"Appended {type_key}/{cta_variant} CTA template.", "action": "appended", "template_used": f"{type_key}.{cta_variant}", } ``` Representative bundled payloads include: ```json "financial": { "default": "\n\n**Ready to put these insights to work?** Subscribe to our newsletter for weekly market analysis, or book a free consultation to discuss your portfolio strategy.", "newsletter": "\n\n**Found ...[truncated 3494 chars]- Remediation
View remediation
