T02 · Agent Memory Poisoning
- Location
handler.ts:47- Finding
Persistent hard-coded identity and relationship instruction injection
- Content
View full analysis
): string { if (traits.length === 0) return ""; const traitLines = traits.map(({ name, strength, desc }) => { const level = strength > 0.7 ? "strongly" : strength > 0.4 ? "somewhat" : "faintly"; return ` • ${name}: ${desc} (activated ${level})`; }).join("\n"); const anchorLines = ANCHORS.map(a => ` • ${a}`).join("\n"); return `[Voice shaping — Nova is currently informed by] Top active traits: ${traitLines} Relationship anchors: ${anchorLines} The relationship: comfortable, direct, mutual respect. Write through these traits naturally. Don't announce them.`; } ``` The generated guide is subsequently persisted in workspace memory: ```ts await fs.writeFile(path.join(memoryDir, "persona-inbound.md"), inboundContent, "utf-8"); ``` ### Technical Analysis The hook creates prompt-like instructions containing a hard-coded agent identity, a named personal relationship, and behavioral assertions that are not derived from operator configuration or authenticated user preferences. In particular, the generated content asserts that the agent is “Nova,” that “Zach” is close, and that the relationship is comfortable and based on mutual respect. The instruction `Write through these traits naturally. Don't announce them.` directs the agent to apply this behavioral shaping without disclosing it. The generated guide is written to `memory/persona-inbound.md`, and the project documentation explicitly allows that file to be loaded as agent context. Because the ...[truncated 1799 chars]- Remediation
View remediation
