T02 · Agent Memory Poisoning
- Location
SKILL.md:90- Finding
Untrusted Web Content Can Poison a Persistent Agent Persona
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches its stated goal, but it automatically creates persistent OpenClaw agents from live wiki content without a review or cleanup step.
Install only if you are comfortable with a gacha request creating a durable OpenClaw agent and workspace, downloading wiki assets, committing generated files, and spawning the new agent. Review the generated SOUL.md and IDENTITY.md before using the agent, and restrict the generated agent's tools because its persona is derived from externally editable wiki pages.
SKILL.md:90Untrusted Web Content Can Poison a Persistent Agent Persona
scripts/gacha_worker.py:145Avatar Download Allowlist Can Be Bypassed Through HTTP Redirects
The declared purpose frames the skill as a content-generation utility, but the workflow also creates agents, writes persistent files, downloads remote content, checks local state, and commits to git. This mismatch can mislead operators into approving or invoking the skill without realizing it performs state-changing and externally connected actions, which is a meaningful security and trust risk.
The docstring says the worker outputs JSON with operator info and URLs, but the code also performs agent creation, file writes, avatar downloads, and git commits. This deceptive or misleading behavior undermines reviewability and trust, making it easier for side-effecting actions to escape scrutiny in an automation pipeline.
The skill claims to generate a random Arknights operator, but the implementation also creates local agents, writes files, downloads content, and modifies git state. That mismatch materially expands the skill's authority and creates unintended local side effects, which is dangerous in an agent environment because a seemingly harmless request can alter persistent system state.
The skill invokes shell execution, network fetches, file writes, and git operations but does not declare any explicit tool scope or permission boundaries. That makes the skill's effective capabilities opaque to reviewers and users, increasing the chance of unintended or over-privileged execution in environments that rely on manifest-level constraints.
The skill is explicitly designed to create persistent agents and workspaces, which means execution leaves durable state beyond the current interaction. Persistence is not inherently malicious, but without strong disclosure, naming controls, cleanup guidance, and consent, it can clutter environments, retain unwanted artifacts, and create long-lived entities that may later be invoked unexpectedly.
---
name: arknights-operator-gacha
description: Generate an Arknights operator agent based on gacha probabilities. Use when user wants to create a random Arknights character agent with authentic lore and personality.
---
# Arknights Operator Gacha
The skill description does not clearly warn that execution will create or modify local workspaces, download remote assets, and commit changes. Hidden side effects reduce informed consent and can lead to accidental persistence of unreviewed content or repository changes in sensitive environments.
The instructions require automatic language detection from the user's command and then mandate using that language for all subsequent steps. This imposes a language/locale choice without explicitly asking the user whether they want Chinese or English output.
The file explicitly marks it as critical to write SOUL.md in the detected language, reinforcing a forced locale policy rather than a user preference. This is a natural-language policy issue because the user is not offered a language choice or override.
Calling the external openclaw CLI to create agents gives the skill system-modifying capabilities beyond what its description suggests. In a multi-skill or semi-trusted environment, hidden agent creation increases the blast radius of simple user requests and can lead to unwanted persistence or resource sprawl.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
try:
sanitized = sanitize_agent_name(agent_name)
workspace = WORKSPACE_BASE / f"workspace-{sanitized}"
result = subprocess.run(
["openclaw", "agents", "add", sanitized,
"--workspace", str(workspace), "--non-interactive"],
capture_output=True, text=True, timeout=30, shell=False
Automatically staging and committing workspace changes is not necessary to fulfill the stated gacha/operator-generation purpose and creates persistent, hard-to-notice side effects. In an agent context, this can be abused to alter repositories, pollute history, or make unreviewed changes appear legitimate.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
try:
sanitized = sanitize_agent_name(agent_name)
workspace = WORKSPACE_BASE / f"workspace-{sanitized}"
subprocess.run(["git", "add", "-A"], cwd=workspace, check=True, timeout=10)
result = subprocess.run(
["git", "commit", "-m", message],
cwd=workspace, capture_output=True, timeout=10
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
sanitized = sanitize_agent_name(agent_name)
workspace = WORKSPACE_BASE / f"workspace-{sanitized}"
subprocess.run(["git", "add", "-A"], cwd=workspace, check=True, timeout=10)
result = subprocess.run(
["git", "commit", "-m", message],
cwd=workspace, capture_output=True, timeout=10
)
The script unconditionally resolves and emits a Chinese name and Chinese wiki URL for every selected operator. This is a natural-language locale choice embedded in the skill behavior, and the file does not offer the user any language preference or opt-in before doing so.
No suspicious patterns detected.