T02 · Agent Memory Poisoning
- Location
SKILL.md:107- Finding
Persistent Agent Memory Poisoning Through Untrusted Session Summaries
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent memory-automation purpose, but it asks to run unpinned code, schedule recurring background reviews, and commit or push session-derived memory without enough safeguards.
Install only if you are comfortable with an agent scanning recent sessions, writing long-term memory and instruction files, and potentially committing or pushing those changes. Pin and verify the npm package before running it, avoid automatic cron or LaunchAgent setup until you have reviewed the exact job, keep memory files out of public repositories unless sanitized, and require manual review before changes to AGENTS.md, MEMORY.md, or any git push.
SKILL.md:107Persistent Agent Memory Poisoning Through Untrusted Session Summaries
SKILL.md:202Cross-Session Persistence Through Cron and macOS LaunchAgent Registration
SKILL.md:19Execution of an Unpinned npm Package Through npx
SKILL.md:36Potential Disclosure of Session-Derived Sensitive Data Through Automated Git Operations
The skill prominently advertises automatic updates to memory files and commits/pushes changes, but it does not clearly warn users that local files and repositories may be modified automatically. In context, this can cause unintended data alteration, accidental publication of sensitive notes, or repository pollution because the automation is framed as routine improvement rather than a potentially risky write-and-sync operation.
The skill instructs users to execute npx compound-engineering without pinning a package version, which can cause whatever package is latest on the registry at runtime to be fetched and executed. In a skill whose purpose is to automate recurring jobs, this increases supply-chain risk because a compromised or malicious future release could be repeatedly invoked by users or schedulers.
This command uses npx compound-engineering without a pinned version, so the executed code may differ over time and may include an attacker-controlled update if the package or dependency chain is compromised. Because the command creates snapshots that may run on a schedule, the blast radius includes repeated execution of unreviewed code.
The setup command again relies on an unpinned npx package, which is especially risky because it configures persistence and automation on the host. If a later package version is malicious, it could alter cron or launch agents and establish durable execution.
The skill directs the agent to extract and store user preferences from prior sessions without a privacy notice or limits on what types of preferences may be retained. This is dangerous because preferences often include behavioral, identity, scheduling, or operational details that can become sensitive once persisted and later surfaced or committed.
The documented memory workflow stores user preferences and project context in persistent files, creating a durable natural-language record that may include confidential business or personal information. Because the skill also recommends version control, the retained data can spread across commit history and remotes, making accidental disclosure harder to remediate.
The manual review instructions tell the agent to summarize learned preferences, decisions, and open items into long-term memory files and then commit them, which can capture sensitive project state, strategy, or personal information in durable storage. This materially increases leakage risk because natural-language summaries often bypass traditional secret scanning and become embedded in git history.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
- User prefers Z approach for...
## Gotchas to Avoid
- Don't do X without checking Y
- API Z has rate limit of...
## User Preferences
The example memory structure explicitly stores user preferences, timezone, and project context such as repository paths and deployment details in long-term memory. In context, these are exactly the kinds of details that can aid social engineering, reveal internal infrastructure, or expose private user information over time.
The launchd plist example instructs the user to install a persistent scheduled job. While not inherently malicious, persistence on a user machine is security-relevant and should be treated carefully, especially since the job will invoke automation that reviews sessions and updates files regularly.
<!-- ~/Library/LaunchAgents/com.clawdbot.compound-review.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.clawdbot.compound-review.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
<dict>
<key>Label</key>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.clawdbot.compound-review.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
<dict>
<key>Label</key>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.clawdbot.compound-review.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
<dict>
<key>Label</key>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.clawdbot.compound-review.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
<dict>
<key>Label</key>
The skill provides crontab instructions that establish recurring execution on the host, which is a persistence mechanism. In this skill's context persistence is a stated feature rather than covert malware behavior, but it still creates security risk because scheduled tasks can repeatedly process sensitive data and continue running after the user forgets they were installed.
# Add with: crontab -e
0 * * * * /opt/homebrew/bin/clawdbot cron run compound-hourly 2>&1 >> ~/clawd/logs/compound.log
No suspicious patterns detected.