T02 · Agent Memory Poisoning
- Location
SKILL.md:194- Finding
Persistent Agent Memory Poisoning Through Unsanitized Lookup Records
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent OpenClaw documentation helper, but it includes under-scoped persistence, remote-fetch fallback behavior, and troubleshooting commands that can expose credentials or change security-sensitive configuration.
Review this skill before installing. Require explicit approval before any web fetch, curl command, cache write, lookup-record write, or version-sync run. Do not let it print raw `.env`, environment variable, API key, or gateway token values into chat or logs. Avoid the unpinned npx install fallback unless you pin and verify the source, and do not expose the gateway on `0.0.0.0` without private-network controls, authentication, and firewall restrictions.
SKILL.md:194Persistent Agent Memory Poisoning Through Unsanitized Lookup Records
SKILL.md:96Untrusted Remote Documentation Is Persisted Without Trust-Boundary Controls
references/troubleshoot.md:111Credential Diagnostic Commands Disclose Complete Secret Values
references/troubleshoot.md:68Unpinned Third-Party Skill Installation Through npx
references/config-guide.md:48Remote-Access Guidance Binds the Gateway to All Interfaces Without Mandatory Safeguards
This duplicate finding points to the same risky construct: a shell-based curl retrieval template for external content. The skill context makes it more dangerous because the workflow mandates trying this fallback after other fetch methods fail, increasing the likelihood that command execution will actually occur during normal use.
### curl 降级命令模板
```bash
# 文档 URL 格式:https://docs.openclaw.ai/<path>
This duplicate finding points to the same risky construct: a shell-based curl retrieval template for external content. The skill context makes it more dangerous because the workflow mandates trying this fallback after other fetch methods fail, increasing the likelihood that command execution will actually occur during normal use.
### curl 降级命令模板
```bash
# 文档 URL 格式:https://docs.openclaw.ai/<path>
The documentation tells users to run cat ~/.openclaw/.env | grep -i API_KEY, which reads secret-bearing material from a credential file and encourages displaying it in the terminal. Even if filtered, this can reveal full API keys and creates a high risk of accidental disclosure through screenshots, scrollback, support transcripts, or recording tools.
openclaw config get plugins.allow
openclaw config get plugins.entries.<provider>.enabled
# 确认 API key 是否在 .env
cat ~/.openclaw/.env | grep -i API_KEY
# 确认 imageGenerationModel 配置
This finding is part of the same credential-inspection workflow and encourages handling .env contents in a way that can disclose sensitive API keys. In troubleshooting docs, such instructions are especially dangerous because users often share exact terminal output with others, amplifying the chance of compromise.
openclaw config get plugins.entries.<provider>.enabled
# 确认 API key 是否在 .env
cat ~/.openclaw/.env | grep -i API_KEY
# 确认 imageGenerationModel 配置
openclaw config get agents.defaults.imageGenerationModel
The command echo 'GEMINI_API_KEY=your_key' >> ~/.openclaw/.env embeds a credential directly in shell input, which can persist in shell history and leak through terminal capture or operational monitoring. Because the document is a step-by-step runbook, users are likely to copy it verbatim, making the unsafe secret-entry pattern more dangerous in context.
添加 API key 到 .env(daemon 环境不读 openclaw.json 的 env 块):
echo 'GEMINI_API_KEY=your_key' >> ~/.openclaw/.env
把 provider 加入 plugins.allow:
The skill directs the agent to perform remote network fetches and then automatically cache results to local files, but it does not require explicit user consent or even a user-facing notice before doing so. This can cause unexpected outbound requests and local state modification, which is risky in agent environments where network access and filesystem writes may expose data, alter future behavior, or violate user expectations.
The fallback path explicitly instructs shell-based network access via curl and pipes untrusted remote content into a Python interpreter pipeline, yet no user-visible approval step is required. Even though the Python snippet is inline, this still expands the attack surface by combining shell execution, remote content retrieval, and hidden network activity without consent.
The documentation explicitly instructs users how to print the current gateway authentication token, which increases the chance that sensitive credentials are exposed in terminals, logs, screen recordings, shell history, or shared troubleshooting output. In a gateway/admin configuration guide, this is more dangerous because the token appears to grant access to the gateway and the doc provides no warning or safer handling guidance.
This markdown file presents all diagnostic instructions, labels, and command guidance exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language policy violation.
This markdown file is in scope for vague-trigger checks, and the table labeled '意图 → 文档路由表' presents '场景关键词' as the activation signal but fills entries with '...' rather than specific keywords. That leaves the routing condition undefined and overly ambiguous, making it unclear what user language should match each document versus what should not.
This markdown file presents the skill reference entirely in Chinese, including the title and operating instructions, with no indication that language is optional or limited to a China-specific audience. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The troubleshooting section instructs users to inspect provider configuration and environment variables for API-related values without any privacy warning, increasing the chance that secrets are exposed in terminal history, screenshots, logs, or copied support output. In a troubleshooting context, users are especially likely to paste command output into chats or tickets, which makes credential leakage materially more likely.
The example appends an API key directly from the shell command line into ~/.openclaw/.env, which risks exposing the key via shell history, process inspection, terminal logging, or copied command transcripts. This is a real secret-handling weakness in documentation because it normalizes an unsafe pattern for entering credentials.
The file’s primary natural-language documentation is entirely in Chinese, including the script description, purpose, and usage notes, with no indication that language selection is optional or that the skill is intentionally region-specific. Under the policy, forcing a specific language without user opt-in is a locale-policy concern.
The skill is presented as a Chinese-language documentation expert (官方文档检索专家) and the operational text is written to produce responses in that locale, while English is only mentioned for activation phrases. There is no explicit statement that users may choose their preferred language for responses, which can be a locale policy issue.
This file opens with a Chinese title and headings and does not state that language selection is optional, even though the index contains multilingual content later in the file. Because policy checks apply to all file types, presenting the index in a single language without an explicit opt-in or language-choice note can be read as a locale preference imposed on users.
The file presents all user-facing troubleshooting guidance exclusively in Chinese and does not indicate that language selection is optional or context-specific. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is documented and justified.
No suspicious patterns detected.