T02 · Agent Memory Poisoning
- Location
scripts/sb-curate.sh:69- Finding
Unreviewed last-write-wins curation enables persistent cross-agent memory poisoning
- Content
View full analysis
/dev/null || true) if [ -n "$existing_line" ]; then existing_val="${existing_line#*= }" existing_val="${existing_val%% " if grep -q "^\[$KEY\] =" "$BRAIN" 2>/dev/null; then # Replace existing key line _SED_I "s|^\[$KEY\] =.*|$ENTRY|" "$BRAIN" ``` ```bash # scripts/sb-curate.sh:98-104 # Report conflicts if [ ${#CONFLICTS[@]} -gt 0 ]; then echo "⚠️ CONFLICTS DETECTED — escalate to TARS:" for c in "${CONFLICTS[@]}"; do echo " $c"; done fi ``` ```bash # scripts/sb-curate.sh:116-119 # Clear queue and report if [ $DRY_RUN -eq 0 ]; then > "$QUEUE" echo "✓ Curated $MERGED facts. Queue cleared." ``` ```bash # SKILL.md:76-78 ```bash cat ~/clawd/memory/shared-brain.md ``` ``` ### Technical Analysis The curator detects when a queued value conflicts with an existing canonical value, but conflict detection only produces a console message. It does not stop promotion or require approval. The conflicting value is immediately written into `shared-brain.md` using last-write-wins semantics, after which the queue is cleared. There is no writer authentication, signature verification, role-to-section authorization, or human approval state. The `SB_AGENT` field is supplied through an environment variable and therefore does not provide trustwo ...[truncated 2030 chars]- Remediation
View remediation
