T09 · Insecure Skill Coding Practices
- Location
scripts/summarizer.py:81- Finding
Indirect Prompt Injection Through Untrusted Bilibili Content
- Content
View full analysis
transcript_limit: transcript_excerpt += "\n... [transcript truncated]" prompt = f"""You are a professional note-taker and content analyst. Title: {title} Author: {author} Description: {description} {chapters_text} Transcript excerpt: {transcript_excerpt} Instructions ({summary_mode} mode): {mode_instructions.get(summary_mode, mode_instructions["detailed"])} IMPORTANT: - Always include the original video source attribution (title + author + link) - Timestamps must be accurate to the second (MM:SS format) - Output in {language} Generate the structured summary now:""" return prompt ``` ```python # scripts/summarizer.py:278-294 prompt = f"""Summarize the following column/article. Title: {title} Author: {author} Text: {column_text[:6000]} Generate a structured Markdown note with: 1. Core thesis (1 sentence) 2. Key arguments (3-5 points) 3. Notable quotes or data 4. Your takeaway Keep it concise but comprehensive.""" return prompt ``` ```python # scripts/segmenter.py:139-168 prompt = f"""Video title: {video_title} Below are the detected chapter boundaries. For each chapter, provide: 1. A concise, informative chapter title (in Chinese or English matching the video) 2. A 1-sentence summary of what this chapter covers Chapters: """ for ch in chapters: context = get_chapter_context(segments, ch) context_preview = context[:200] + "..." if len(context) > 200 else context prompt += f""" Chapter {ch['index']}: {_format_time(ch['start_seconds'])} - {_format_time(ch['end_seconds'])} Content preview ...[truncated 2284 chars]- Remediation
View remediation
