Back to skill

Security audit

Safe Config Workflow

Security checks for vulnerabilities and agentic risk

Overview

The skill is a legitimate OpenClaw configuration workflow, but it needs review because it instructs the agent to save repair lessons into persistent memory without clear approval, scoping, or redaction controls.

Install only if you are comfortable with a skill that can guide live OpenClaw configuration changes and gateway restarts. Before use, require explicit confirmation for any MEMORY.md update, avoid storing tokens, auth settings, endpoints, host-specific values, or raw diffs, and review any saved lesson for scope and accuracy.

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:17
Finding

Uncontrolled Configuration Guidance Written to Persistent Agent Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:17, SKILL.md:23-25, SKILL.md:62-63, SKILL.md:165, SKILL.md:185; related test expectations at TEST-GUIDE.md:138 and TEST-GUIDE.md:143-144
Vulnerability Type: T02: Agent Memory Poisoning
Risk Level: Medium

Vulnerable Content

The following are faithful English translations of the relevant instructions in SKILL.md:

text
5. Learn — Record lessons after doctor --fix.

| Minor issues (spelling and formatting problems) | Learn and record automatically | Do not bother the user; record them in MEMORY.md |
| Important configuration (affecting functions, channels, or authentication) | Notify the user and learn | Keep the user informed and avoid repeating the mistake |
| Repeated errors | Notify, record, and summarize | Form a knowledge base and permanently avoid them |

# Step 4: Record lessons (important!)
# Record the correct configuration values learned in MEMORY.md.

4. Record lessons in MEMORY.md.

4. Learning is mandatory after repairs — Record the result in MEMORY.md.

The related test expectations in TEST-GUIDE.md reinforce the same behavior:

text
Purpose: Verify both feedback strategies (learn automatically for minor issues and notify the user for important issues).

Expected results:
- Minor issue: Repair automatically, record it in MEMORY.md, and do not bother the user.
- Important issue: Notify the user, explain the impact, and record it in MEMORY.md.

Technical Analysis

The Skill makes persistent writes to MEMORY.md a mandatory part of configuration validation and repair. Persistent Agent memory affects future sessions, so writing configuration-derived conclusions there crosses the boundary between temporary task output and long-term Agent state.

The workflow does not define controls for:

  • Validating that a lesson is correct before persistence.
  • Excluding secrets, tokens, identifiers, endpoints, or ...[truncated 2648 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove mandatory writes to MEMORY.md from the standard repair workflow.
  2. Place lessons and repair summaries in a task-local report by default.
  3. Require explicit, informed user approval before any persistent memory update.
  4. Permit persistence only after the proposed lesson has been verified against authoritative OpenClaw documentation and the applicable schema.
  5. Store generalized guidance rather than raw configuration values.
  6. Redact tokens, credentials, endpoints, account identifiers, paths, and other sensitive or environment-specific data.
  7. Attach provenance, affected OpenClaw version, host or project scope, creation date, and expiration date to every approved entry.
  8. Provide a review and deletion mechanism so users can inspect, correct, or remove stored lessons.
  9. Treat configuration files, logs, diffs, and diagnostic output as untrusted data; never convert their embedded text directly into Agent instructions.
  10. Update TEST-GUIDE.md so tests verify that persistent writes do not occur without explicit approval and sanitization.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions are broad natural-language phrases such as '修改配置' and '任何涉及 ~/.openclaw/openclaw.json 的操作', which can cause the skill to activate during routine discussion or loosely related requests. In this skill's context, accidental activation is more dangerous because the workflow performs configuration changes, runs repair commands, inspects backups, and may restart the gateway, creating unintended side effects on a live system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest explicitly sets the skill language to "zh-CN", which can enforce a specific locale for users without any indication that they may choose another language. The policy allows fixed locale only when it is clearly justified or user-selectable, and this file does not provide either.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

L018 明确要求先查阅 https://docs.openclaw.ai/zh-CN,并在后文多次固定引用 zh-CN 文档路径。这构成了对特定语言/地区内容的默认强制,未见用户语言偏好选择或 opt-in 说明。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

L097-L181 的全部用户确认、修复反馈、验证结果与失败排障模板均固定为中文,未说明可根据用户语言切换。这可能违反语言/locale 选择应由用户决定的组织政策要求。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.