T02 · Agent Memory Poisoning
- Location
scripts/promote.sh:29- Finding
Automatic Promotion of Untrusted Content into Persistent Agent Instructions
- Content
View full analysis
/dev/null)" [ -z "$RESULT" ] && continue if [ ! -f "$CLAUDE_MD" ]; then cat > "$CLAUDE_MD" << 'HEADER' # Project Guidelines HEADER fi if ! grep -qF '' "$CLAUDE_MD" 2>/dev/null; then cat >> "$CLAUDE_MD" << 'SECTION' ## Reflexion: Learned Rules Rules auto-promoted from recurring patterns. Do not edit this section manually. SECTION fi echo "$RESULT" >> "$CLAUDE_MD" ``` ### Technical Analysis The script treats the `resolution` property of every matching `.reflexion/entries/RFX-*.json` file as a trusted agent rule. Promotion only verifies that the entry has at least three occurrences, is at least one day old, has a nonempty resolution, and is not already marked as promoted. There is no validation of the content's origin, no human approval, and no filtering of instructions that attempt to override safety controls or redirect future agent actions. The resolution is appended verbatim to `CLAUDE.md`, which is a ...[truncated 1465 chars]- Remediation
View remediation
