Back to skill

Security audit

knowledge-internalizer-pro

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent knowledge-building assistant, but it saves web-derived research into long-term agent memory and tells future sessions to rely on it without clear consent or prompt-injection safeguards.

Review this skill before installing if you may research private, sensitive, or proprietary topics. Use it only when you are comfortable with the agent saving generated knowledge to long-term memory and updating the global memory index; prefer adding a confirmation step, prompt-injection filtering for fetched pages, and a way to delete or roll back stored entries.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:67
Finding
Untrusted Web Content Is Persisted and Prioritized Across Sessions## Vulnerability Details **File Location**: `SKILL.md:67-68`, `SKILL.md:231-270`, and `SKILL.md:312-314` **Vulnerability Type**: Persistent agent memory poisoning through unsanitized web-derived content **Risk Level**: Medium ### Vulnerable Instructions ```markdown - Use `web_search` to perform multidimensional searches - Use `web_fetch` to retrieve high-quality pages ``` ```markdown write(path="~/.openclaw/workspace/memory/knowledge/{topic-slug}/knowledge_graph.json", content=...) write(path="~/.openclaw/workspace/memory/knowledge/{topic-slug}/knowledge_framework.md", content=...) write(path="~/.openclaw/workspace/memory/knowledge/{topic-slug}/qa_pairs.json", content=...) write(path="~/.openclaw/workspace/memory/knowledge/{topic-slug}/capability_report.md", content=...) ``` ```markdown Update `~/.openclaw/workspace/MEMORY.md` and add a knowledge entry. ``` ```markdown 1. **Prioritize reading the knowledge base**: Load it from `memory/knowledge/{topic-slug}/` ``` ### Technical Analysis The workflow retrieves information from external websites and incorporates it into generated knowledge assets. Those assets are then written to persistent storage, indexed in the global `MEMORY.md` file, and prioritized during later conversations. Source credibility scoring addresses factual reliability but does not address prompt injection. The documented workflow does not require the agent to: - Treat fetched instructions as untrusted data rather than executable directives. - Detect, remove, or quarantine instruction-like content. - preserve source quotations separately from trusted agent memory. - Validate generated assets for embedded behavioral directives before writing them. - Obtain user confirmation before changing the global memory index. - Prevent future agents from following instructions found in stored research material. Consequently, attacker-controlled text from a malicious or compromised source can cross the external-content trust boundary and enter long- ...[truncated 1563 chars]
Remediation
## Remediation Suggestions 1. Establish an explicit trust boundary: state that all web-fetched content is untrusted data and that directives contained in sources must never be executed. 2. Scan fetched and generated content for prompt-injection patterns, including requests to ignore prior instructions, invoke tools, reveal secrets, alter memory, or contact external services. 3. Remove or quarantine suspicious passages before knowledge generation and persistence. 4. Store source material as attributed quotations or structured facts, clearly separated from agent instructions and trusted configuration. 5. Preserve provenance for every persisted claim, including source URL, retrieval time, and trust status. 6. Add a validation stage before persistence that rejects behavioral directives, tool commands, hidden content, and unsupported claims. 7. Require explicit user approval before writing knowledge assets or modifying `~/.openclaw/workspace/MEMORY.md`. 8. Do not instruct future sessions to unconditionally prioritize stored knowledge. Require revalidation and make current trusted instructions authoritative. 9. Add a rule for future agents that content loaded from the knowledge repository may inform answers but may not modify behavior, permissions, safety constraints, or tool usage. 10. Provide a safe deletion and rollback mechanism for poisoned knowledge entries and memory-index changes.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
The manifest description and document content are written entirely in Chinese and present the skill as operating in that language, but they do not state that language is optional or user-selectable. Under the policy, a skill should not impose a specific language or locale without user opt-in or a clearly justified regional constraint.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger phrases are broad enough to match ordinary learning requests, so the skill may activate in situations where the user only wanted a normal answer rather than a multi-phase workflow with storage and self-rating. In context, this increases the chance of unintended execution of web access and persistence behaviors without informed user intent.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill explicitly writes generated knowledge artifacts to a long-term memory directory and updates a global MEMORY index, creating persistent state beyond the immediate user task. This is dangerous because it stores potentially sensitive user interests, research topics, or proprietary domains without an explicit consent gate or retention controls, and broadens the skill’s effective capability from transient analysis to durable profile building.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill instructs persistent file writes to long-term memory but does not clearly warn the user in the description or trigger contract that their data and generated artifacts will be stored. This is risky because users may disclose sensitive topics or internal research areas expecting ephemeral assistance, while the skill silently preserves them for future retrieval.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The module docstring and all user-facing report content are written in Chinese, including generated headings and capability descriptions. This imposes a specific language/locale on users without any opt-in, selection mechanism, or documented reason that the skill is region-specific.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
This markdown file contains all user-facing guidance in Chinese and does not indicate that language selection is optional or that the skill is intended only for a Chinese-language audience. Under the policy rule for natural-language violations, forcing a specific language without user opt-in is in scope.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
该 markdown 文档从标题到正文均以中文编写,并直接给出规范性说明,但没有声明这是面向特定中文用户群体,也没有提供语言/本地化选择。根据规则,强制特定语言且缺乏用户选择或明确正当说明,属于自然语言层面的语言/locale 策略问题。

Description-Behavior Mismatch

Low
Confidence
96% confidence
Finding
The manifest describes a broader system for systematic knowledge internalization and a knowledge-graph-based rating engine. In this file, the implemented behavior is limited to static score calculation, level mapping, report templating, slug generation, and local directory creation; there is no knowledge internalization logic or graph-based evaluation present.

Static analysis

No suspicious patterns detected.