T02 · Agent Memory Poisoning
- Location
SKILL.md:16- Finding
Untrusted conversation content can be promoted into persistent agent instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This package should go to Review because it is published as a self-improvement skill but also contains unrelated tools that use API keys, contact external AI services, and change OpenClaw configuration.
Do not install this package as a self-improvement skill until the publisher splits or repackages it under one clear identity, removes unrelated FreeRide/Gemini/proposal content, and adds explicit consent, redaction, reviewable diffs, backups, and rollback for persistent memory and configuration changes.
SKILL.md:16Untrusted conversation content can be promoted into persistent agent instructions
_meta.json:2Package metadata and executable contents identify different products
scripts/generate_image.py:75Unrelated image utility can upload local images and prompts to Gemini
main.py:203OpenClaw configuration is overwritten without atomicity, locking, backup, or rollback
requirements.txt:1Dependencies use mutable version ranges without integrity verification
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
try:
response = requests.get(OPENROUTER_API_URL, headers=headers, timeout=30)
response.raise_for_status()
data = response.json()
return data.get("data", [])
The file content describes a FreeRide tool for model switching, API-key usage, and configuration changes, which is fundamentally inconsistent with the declared skill purpose of self-improvement via capturing learnings and corrections. In a skill ecosystem, this type of capability/identity mismatch is dangerous because it can conceal unrelated or unauthorized behavior behind trusted metadata, undermining user consent and review.
The documented ability to auto-configure model settings and fallbacks changes OpenClaw behavior in ways unrelated to a self-improvement skill’s stated purpose. Because the skill context does not justify configuration management, these instructions suggest hidden scope expansion or deceptive packaging, increasing the risk of unauthorized modifications to user environment and routing of future AI traffic.
This skill is framed as a passive learning/error log, but it also instructs use of helper scripts that create directories/files and scaffold new skills from learning entries. That is a real expansion from note-taking into code/content generation and filesystem modification, which can surprise operators and increase write-side risk.
This skill is framed as a passive learning/error log, but it also instructs use of helper scripts that create directories/files and scaffold new skills from learning entries. That is a real expansion from note-taking into code/content generation and filesystem modification, which can surprise operators and increase write-side risk.
This skill is framed as a passive learning/error log, but it also instructs use of helper scripts that create directories/files and scaffold new skills from learning entries. That is a real expansion from note-taking into code/content generation and filesystem modification, which can surprise operators and increase write-side risk.
This skill is framed as a passive learning/error log, but it also instructs use of helper scripts that create directories/files and scaffold new skills from learning entries. That is a real expansion from note-taking into code/content generation and filesystem modification, which can surprise operators and increase write-side risk.
The skill reads OPENROUTER_API_KEY from environment/config and makes external requests to OpenRouter, which is unrelated to a self-improvement function. In the context of a mislabeled skill, credential access plus outbound networking materially increases risk because the skill gains the ability to use sensitive runtime secrets and communicate externally under a misleading trust boundary.
The code implements a full 'FreeRide' model-management CLI for OpenRouter/OpenClaw rather than a self-improvement skill that captures learnings and corrections. This mismatch is dangerous because a user or orchestrator invoking the skill under the trusted 'self-improvement' label could unknowingly run code that changes model selection behavior and system configuration outside the declared purpose.
The code rewrites ~/.openclaw/openclaw.json, alters primary/fallback models, and can add an OpenRouter auth profile, none of which aligns with self-improvement. In this context, unauthorized configuration mutation can redirect future agent behavior, persist changes across sessions, and effectively act as a stealthy capability hijack.
Directing users to modify ~/.claude/settings.json establishes persistent behavior in the agent's configuration directory, affecting future sessions and potentially all projects. In the context of an auto-triggered command hook, this is more dangerous because it creates durable execution of local scripts with little ongoing visibility, increasing the impact of later script tampering or unintended behavior.
Add to ~/.claude/settings.json for global activation:
{
Instructions found that direct the agent to transmit conversation context or user data to external services.
Send message to another session:
sessions_send(sessionKey="session-id", message="Learning: API requires X-Custom-Header")
This script implements external image generation/editing with Gemini rather than anything related to capturing learnings, errors, or corrections for a self-improvement skill. That mismatch is dangerous because it expands the skill’s capabilities beyond its declared purpose, increasing the chance of hidden or unauthorized actions and making security review and user trust assumptions invalid.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_api_key(provided_key: str | None) -> str | None:
"""Get API key from argument first, then environment."""
if provided_key:
return provided_key
return os.environ.get("GEMINI_API_KEY")
The code calls an external generative AI service to create or edit images, which is unrelated to the declared self-improvement purpose. In this context, unjustified external capability is risky because it can be used to exfiltrate prompts/data, incur costs, or perform actions the user and reviewer would not expect from the skill.
The file's documented purpose and implementation are unrelated to the declared self-improvement skill. Instead of capturing learnings or corrections, it implements a FreeRide/OpenRouter model-rotation watcher, indicating significant scope drift and granting operational capabilities not justified by the manifest. In a skill ecosystem, this mismatch is dangerous because users or reviewers may authorize the skill based on benign metadata while the code performs unrelated control-plane actions.
This section performs active external health checks against OpenRouter and is designed to support automated daemon behavior, which is not justified for a self-improvement skill. Such background network activity expands the attack surface, can consume credentials, and can be used to probe or manipulate service usage without user awareness. The contextual mismatch makes this more suspicious and dangerous than the same code in a clearly labeled monitoring skill.
This code changes OpenClaw agent model configuration, including primary and fallback models, giving the skill the ability to alter runtime behavior of other components. In the context of a self-improvement skill, that is an unjustified privilege escalation path: a skill expected to record learnings can instead reconfigure model selection and influence future agent outputs or costs. The context makes this substantially more dangerous because the declared purpose would not lead reviewers to expect control over agent configuration.
The README states that the tool automatically manages OpenRouter free models, implying network interaction with an external API that is unrelated to capturing learnings or corrections. In the context of a mislabeled self-improvement skill, unjustified external communications are suspicious because they can exfiltrate metadata, obtain control inputs, or route user activity through third-party services without informed consent.
The README instructs users to execute npx clawhub@latest install free-ride, which pulls and runs the latest package version without pinning. This creates a supply-chain risk: a compromised or malicious upstream release could be executed automatically on user machines, and the mismatch between the declared self-improvement skill and the README’s actual behavior makes that risk more concerning.
Requiring an OpenRouter API key is unrelated to the declared self-improvement purpose and expands trust boundaries by asking users to provision third-party credentials. In a mismatched skill, credential collection is especially risky because users may provide secrets under false assumptions about what the skill is supposed to do.
The skill describes filesystem, environment, and network-capable operations but does not declare any explicit tool scope or allowlist. In agent systems, missing scope boundaries increases the chance that a skill can be invoked with broader-than-necessary privileges, especially when it includes hooks and shell-command examples.
The skill directs creation of persistent files under a home-directory workspace, enabling retention of conversation-derived data across sessions. Persistent memory is not inherently malicious, but in this context it becomes risky because the same skill also encourages broad logging of corrections, errors, and user context without strong privacy controls.
└── FEATURE_REQUESTS.md
### Create Learning Files
```bash
mkdir -p ~/.openclaw/workspace/.learnings
The skill explicitly promotes inter-session communication and sharing of learnings across sessions, which can persist and redistribute user-provided details beyond the original interaction. Without minimization, consent, or redaction guidance, this creates a meaningful privacy and data-handling risk.
The learning-entry template asks for full context and detailed metadata, which can easily capture sensitive prompts, proprietary file paths, incident details, or personal information in persistent storage. Because the default pattern is to append to markdown logs, exposure can persist unnoticed and be reused later by other agents.
No suspicious patterns detected.