T02 · Agent Memory Poisoning
- Location
SKILL.md:120- Finding
Persistent Prompt Injection Through Untrusted Working-Memory Content
- Content
View full analysis
{context.text} {your_existing_system_prompt} """ ``` ```python # scripts/loader.py:72-79 @property def text(self) -> str: """Concatenate all loaded content into a single memory block.""" parts = [] for c in self.contents: parts.append(f"\n{c.text}") return "\n\n---\n\n".join(parts) ``` ```python # scripts/writer.py:147-198 def _write_daily_log( self, today: str, now: datetime, duration: int, summary: str, events: Optional[str], mood: str, ): """Write or append to today's daily log.""" memory_dir = self.root / "memory" memory_dir.mkdir(parents=True, exist_ok=True) log_path = memory_dir / f"{today}.md" threads_str = ", ".join(self.capture.thread_refs) if self.capture.thread_refs else "—" sections = [] if not log_path.exists(): sections.append(f"# Daily Log — {today}\n") sections.append( f"> Session: {now.strftime('%H:%M')} UTC, ~{duration} min\n" f"> Thread(s) active: {threads_str}\n" ) sections.append(f"## Session Summary\n\n{summary}\n") if events: sections.append(f"## What Happened\n\n{events}\n") if self.capture.decisions: rows = ["| Decision | Reasoning | Ref |", "|----------|-----------|-----|"] for d in self.capture.decisions: ref = ", ".join(self.capture.thread_refs) if self.capture.thread_refs else "—" ...[truncated 3006 chars]- Remediation
View remediation
