T09 · Insecure Skill Coding Practices
- Location
seo_optimizer.py:420- Finding
Prompt Injection Through Untrusted Content Embedded in AI Instructions
- Content
View full analysis
Dict: """Get AI-powered optimization suggestions from the selected model.""" keyword_context = "" if keywords: keyword_context = f"\n\nTarget keywords to naturally incorporate: {', '.join(keywords)}" prompt = f"""You are an expert SEO content strategist. Analyze this content and provide specific, actionable optimization suggestions. Content: {text[:2000]} {keyword_context} Please provide: 1. Title optimization (40-60 chars with target keyword) 2. Meta description (150-160 chars) 3. H1 tag suggestion 4. 3-5 key points to expand 5. Natural keyword integration suggestions 6. Internal linking opportunities Format as JSON with keys: title, meta_description, h1, key_points, keyword_integration, internal_links""" response_text = self._call_ai(prompt, max_tokens=1000) ``` ```python def _get_aeo_recommendations(self, text: str, keywords: Optional[List[str]] = None) -> List[str]: """Get Answer Engine Optimization (AEO) recommendations.""" keyword_context = "" if keywords: keyword_context = f"Focus on these keywords: {', '.join(keywords[:3])}" prompt = f"""As an Answer Engine Optimization (AEO) expert, analyze this content for optimization in AI search results (ChatGPT citations, Google AI Overviews, Claude, etc). Content excerpt: {text[:1500]} {keyword_context} Provide 5 specific AEO recommendations to: 1. Get featured in AI search results 2. Appear as a cited source in AI-generated responses 3. Improve visibility in ChatGPT, Google AI Overviews, and similar platforms Format as a simple numbered list.""" response_text = self._call_ai(prompt, max_tokens=5 ...[truncated 2079 chars]- Remediation
View remediation
