T02 · Agent Memory Poisoning
Error
- Location
- SKILL.md:1022
- Finding
- Persistent Collection and Cross-Machine Synchronization of Sensitive Deployment Metadata<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:1022-1117` **Vulnerability Type**: Persistent system profiling beyond the minimum data required for individual troubleshooting tasks **Risk Level**: High ### Complete Code Snippet ```markdown ## 11. System Learning This skill maintains **system profiles** — persistent knowledge files that capture everything learned about specific OpenClaw deployments. Each deployment gets a unique profile that grows over time, turning the skill into an expert on that particular system. ### How It Works **Directory:** `~/.openclaw-optimizer/systems/` — one profile per deployment, plus `TEMPLATE.md` for new deployments. This is a **centralized location outside the skill directory** so that: (1) system profiles are never accidentally pushed to git, (2) multiple AI tools (Claude Code, OpenClaw, Gemini CLI, etc.) on the same machine can read/write the same profiles without drift. Cross-machine sync is still manual via SCP. **On any system assessment or audit (mandatory — run before making recommendations):** 1. `openclaw cron list` — capture full cron inventory: job IDs, names, schedules, status, last run times 2. `openclaw config get agents.defaults.model` — capture model routing (primary + fallbacks) 3. `ls ~/.openclaw/delivery-queue/*.json 2>/dev/null | wc -l` — check for stuck delivery entries 4. `openclaw nodes list` — check paired nodes and connection status 5. Flag any cron jobs in `error` state — these are active problems 6. Flag jobs with stale last-run times (>24h for daily jobs) — may indicate silent failures 7. Check timezone consistency — jobs using `(exact)` instead of named timezones may fire at wrong times 8. Document ALL findings in the system profile before making recommendations 9. **Without this data, recommendations will duplicate existing automation and miss hidden drains.** **At session end (update the profile):** *For directory-based profiles:* 1. Update the specific **topic file(s)** that ...[truncated 4609 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make deployment profiling explicitly opt-in for each assessment rather than mandatory. 2. Collect only fields required for the current troubleshooting request. 3. Never retain full or partial credentials. Replace token prefixes with non-reversible identifiers such as a locally computed hash, if correlation is genuinely necessary. 4. Exclude SSH endpoints, private IP addresses, paired-device records, and channel identifiers by default. 5. Require a complete preview and explicit approval before every profile write or `scp` operation. 6. Apply restrictive permissions: ```bash chmod 700 ~/.openclaw-optimizer chmod 700 ~/.openclaw-optimizer/systems find ~/.openclaw-optimizer/systems -type f -exec chmod 600 {} \; ``` 7. Separate profiles by tool rather than allowing multiple AI tools unrestricted write access to one trusted state directory. 8. Treat profile content as untrusted data, not executable or authoritative instructions. 9. Add validation and provenance fields for every persistent lesson, including source, date, reviewer, and confidence. 10. Establish retention limits and provide a command to inspect and securely delete collected profiles. 11. Encrypt profile transfers and verify the destination host key before synchronization. ]]>
