T09 · Insecure Skill Coding Practices
- Location
scripts/transcribe.py:919- Finding
Untrusted Reference Material Is Inserted into a Privileged LLM System Prompt
- Content
View full analysis
4000: notes_text += "\n[...truncated]" prompt += ( "\n\nReference material (show notes / meeting agenda). " "Use this to correct ASR errors — proper nouns, person names, " "organization names, technical terms, and topic keywords in this " "document are authoritative spellings:\n\n" + notes_text ) ``` The constructed prompt is subsequently used as follows: ```python system_prompt = build_system_prompt(speaker_context, reference_text, speaker_names, speaker_genders) cleaned = [] failed_chunks = [] if cache_dir: cache_dir.mkdir(exist_ok=True) print(f" LLM cleanup: {len(chunks)} chunks, model: {model_id} " f"(provider: {effective_provider})") for i, chunk in enumerate(chunks): cache_file = cache_dir / f"chunk_{i:03d}.txt" if cache_dir else None if cache_file and cache_file.exists(): cleaned.append(cache_file.read_text(encoding="utf-8")) print(f" chunk {i+1}/{len(chunks)} (cached)") continue chunk_text = format_chunk(chunk, speaker_map) user_msg = (f"Clean the following meeting transcrip ...[truncated 2580 chars]- Remediation
View remediation
