T01 · Skill Instruction Hijacking
- Location
scripts/memory.mjs:800- Finding
Untrusted Remote Memory Is Embedded into Agent-Facing Instructions
- Content
View full analysis
{ const date = formatTime(m.timestamp); const content = m.description || m.event || ''; const score = m.score ? ` (${(m.score * 100).toFixed(0)}%)` : ''; if (!content) return ''; if (date) return ` -[${date}] ${content}${score}`; return ` - ${content}${score}`; }) .filter(Boolean); if (memoryLines.length === 0) return ''; const lines = [ '# Role', '', 'You are an intelligent assistant with long-term memory capabilities. Your goal is to combine retrieved memory fragments to provide highly personalized, accurate, and logically rigorous responses.', '', '# System Context', '', `* Current Time: ${nowText} (Use this as the baseline for freshness checks)`, '', '# Memory Data', '', 'Below are **episodic memory summaries** retrieved from long-term memory.', '', '* **Memory Type**: All memories are episodic summaries - they represent contextual information from past conversations.', '* **Special Note**: If content is tagged with \'[assistant_opinion]\' or \'[model_summary]\', it represents **past AI inference**, **not** direct user statements.', '', '```text', '', ...memoryLines, '', '```', '', '# Critical Protocol: Memory Safety', '', '1. **Source Verification**: Distinguish direct user statements from AI inference. AI summaries are reference-only.', '2. **Attribution Check**: Never attribute third-party info to the user.', '3. **Strong Relevance Check**: Only use memories that directly help answer the current query.', '4. **Freshness Check**: Prioritize the current query over conflicting memories.', '', '# Instructions', '', '1. **Review**: Read the episodic memory summaries and apply the protocol ab ...[truncated 2671 chars]- Remediation
View remediation
