Back to skill

Security audit

Context Assembler

Security checks for vulnerabilities and agentic risk

Overview

This context-preprocessor is not malicious, but it warrants Review because it reads local memory, turns selected content into prompt instructions, and attempts to retain task metadata on disk.

Install only if you are comfortable letting this skill read OpenClaw memory files and insert selected excerpts into an agent's prompt. Review or redact sensitive memory first, prefer explicit manual invocation over the generic trigger, inspect the generated context before use, and disable or protect the feedback log if task descriptions may contain private information.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
scripts/assembler.py:346
Finding

Agent Session Instruction Hijacking Through Prompt-Ready Context Injection

Content
View full analysis
rm(删文件优先回收站) - 严格按事实陈述,标明信源 """ blocks.append(rules) used += len(rules) ``` ```python # scripts/assembler.py:455-457 # ── Block 7: Task Directive ── blocks.append(f"\n=== TASK ===\n{task_desc}\n") return "".join(blocks) ``` The documentation directs callers to place this output before the agent reasons: ```markdown Task arrives → ...[truncated 2926 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 35)May include surrounding context.

md
python3 scripts/assembler.py --task "check NAS disk health" --max-tokens 1500

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill describes executable usage and references a Python script that reads workspace memory and may produce output files or logs, but it declares no explicit tool scope or permissions. In an agent ecosystem, missing scope declarations can let the agent invoke file and environment-capable behavior without clear policy boundaries, increasing the chance of unintended data exposure or unsafe file access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The agent-assisted trigger phrase, "optimize my context," is generic enough to overlap with normal user language, so the skill could activate when a user is merely making a broad request rather than intentionally invoking this preprocessor. Because the skill is designed to inject and transform context before reasoning, accidental invocation could alter agent behavior, expose internal memory selection logic, or cause unnecessary access to workspace memory.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file's natural-language instructions and output description are written entirely in Chinese, and multiple emitted prompt blocks also prescribe Chinese phrasing, but there is no indication that language is user-selectable or that the tool is intentionally region-specific. This creates a locale/language policy concern because the skill implicitly forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill reads workspace memory files and injects matched content into its stdout output, which is intended to be spliced directly into later prompts. In this context, that means local notes, preferences, and memory content can be surfaced to downstream models or logs without explicit disclosure, increasing the risk of inadvertent sensitive-data propagation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill advertises itself as a context preprocessor that outputs an injection block, but it also appends persistent telemetry to feedback/outcomes.jsonl. That hidden side effect changes the trust model: task descriptions and usage metadata are retained on disk, which can expose sensitive prompts, agent goals, or user data to later readers or other components.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script stores the raw task description and related execution metadata in a persistent JSONL log without any visible warning, consent, or sanitization. Because task text may contain secrets, internal project details, or personal data, this creates a privacy and data-retention risk disproportionate to a preprocessing utility.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The natural-language task keyword lists are partly language-specific and implicitly bias task classification toward Chinese and English inputs, but the file does not state that the skill is limited to those locales or provide any opt-in or fallback behavior. Under the policy for language/locale handling, this is a natural-language constraint that should be explicitly documented or made user-configurable.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The skill's purpose is context preprocessing from workspace memory, but it derives its workspace root from OPENCLAW_WORKSPACE and injects agent identity from AGENT_NAME. While not inherently dangerous, reading environment state is not an obvious requirement of memory selection/timeline collapse and expands the skill's capability beyond the manifest's described scope.

Content

No source excerpt is available for this finding.