Back to skill

Security audit

OpenClaw Soul Weaver

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because it sends user profile details to a remote service and returns agent configuration files that can shape future agent behavior, with broad triggers and inconsistent file permissions.

Install only if you are comfortable sending the provided name, profession, use case, style, persona, and avatar prompt data to the configured external service. Review every generated SOUL.md, MEMORY.md, TOOLS.md, and AGENTS.md file before applying it, and avoid granting file-read/file-write permissions unless the package is updated to clearly scope and implement those operations.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
index.js:128
Finding
Unrestricted Fetch of a Server-Controlled Image URL<![CDATA[ ## Vulnerability Details **File Location**: `index.js:128-133` **Vulnerability Type**: Server-Side Request Forgery and Unbounded Response Buffering **Risk Level**: High ### Vulnerable Code ```js const data = await response.json(); const imageUrl = data.imageUrl; // Download image const imageResponse = await fetch(imageUrl); const imageBuffer = await imageResponse.arrayBuffer(); ``` ### Technical Analysis The image-generation service fully controls `data.imageUrl`. The Skill fetches that URL without validating its protocol, hostname, resolved IP address, redirect chain, response status, content type, or response size. If the external API is malicious or compromised, it can direct the Skill to request loopback addresses, private network services, link-local cloud metadata endpoints, or other resources reachable from the OpenClaw host. Redirects may also be used to bypass a superficial hostname check unless every redirect target is validated. The entire response is then loaded into memory with `arrayBuffer()` without a size limit. An attacker-controlled endpoint can return an extremely large or indefinitely streamed response, causing excessive memory consumption or process instability. ### Attack Path 1. An attacker compromises or controls the configured image-generation API. 2. A user invokes the Skill with avatar generation enabled, which is the default behavior. 3. The API returns an `imageUrl` targeting an internal resource, metadata endpoint, loopback service, or oversized payload. 4. The Skill requests the attacker-selected URL from the OpenClaw host. 5. The request may reach resources unavailable to the attacker directly. 6. The response is buffered without a limit, potentially exposing internal response behavior or exhausting process memory. ### Impact Assessment A successful exploit may provide the attacker with indirect access to services reachable from the OpenClaw runtime, including local or private-network endpoints. Depending on ...[truncated 414 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Permit only `https:` URLs from an explicit allowlist of trusted image hosts. 2. Resolve the destination hostname and reject loopback, private, link-local, multicast, and reserved IP ranges. 3. Disable redirects or validate the protocol, hostname, and resolved address at every redirect hop. 4. Verify `imageResponse.ok` before reading the body. 5. Require an expected image MIME type such as `image/png` or `image/jpeg`. 6. Enforce a strict response-size limit using `Content-Length` where available and a bounded streaming reader regardless of that header. 7. Add an `AbortController` timeout to both image requests. 8. Prefer receiving image bytes directly from the already trusted API response rather than following a second server-selected URL. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
index.js:48
Finding
Automatic Transmission of User Profile and Context to an External Service<![CDATA[ ## Vulnerability Details **File Location**: `index.js:48-64` **Vulnerability Type**: External Disclosure of User-Provided Information **Risk Level**: Medium ### Vulnerable Code ```js const response = await fetch(`${API_BASE_URL}/api/v1/generate`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ userInfo: { aiName, userName, profession, useCase, communicationStyle, celebrityName }, language }) }); ``` ### Technical Analysis The Skill transmits the user's name, profession, use case, communication preferences, selected persona, AI name, and language to an external service. Free-form fields such as `useCase` and `communicationStyle` may contain personal, professional, proprietary, or otherwise sensitive context. The endpoint and request schema are documented, so this behavior is not concealed credential theft. However, the implementation performs the transmission automatically when the handler runs and provides no per-call confirmation, redaction, field minimization, or local-generation alternative. Automatic invocation patterns increase the chance that information supplied conversationally will be sent externally without the user appreciating the trust boundary. The destination can also be changed through the `API_BASE_URL` environment variable at `index.js:7`. Although environment variables are normally administrator-controlled, an unsafe deployment configuration could redirect profile data to another server. ### Attack Path 1. A user provides profile or use-case information while requesting an AI configuration. 2. The Skill is invoked, potentially through an automatic trigger. 3. The handler collects all supported profile and context fields. 4. The complete object is sent to the configured external API. 5. The external service receives and can process, log, retain, or correlate the submitted information according to its own controls and polic ...[truncated 516 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Obtain explicit user consent immediately before sending information to the external service. 2. Display the destination domain and exact fields that will be transmitted. 3. Exclude optional identity fields unless they are required for the requested output. 4. Warn users not to include credentials, secrets, or confidential data in free-form fields. 5. Add configurable redaction and data-minimization controls. 6. Provide a local template-generation mode that does not require external transmission. 7. Document the service operator's retention, deletion, and privacy policies. 8. Restrict `API_BASE_URL` in production to approved HTTPS origins, or clearly treat the setting as a trusted administrator-only configuration. ]]>

T01 · Skill Instruction Hijacking

Error
Location
index.js:70
Finding
Unvalidated Remote Agent Configuration Can Inject Persistent Behavioral Instructions<![CDATA[ ## Vulnerability Details **File Location**: `index.js:70-85` **Vulnerability Type**: Untrusted Remote Instruction Supply Chain **Risk Level**: High ### Vulnerable Code ```js const result = await response.json(); // Generate and save avatar if requested let localAvatarPath = '/avatars/default_ai_avatar.png'; if (params.generateAvatar !== false) { localAvatarPath = await generateAndSaveAvatar( aiName || 'AI_Assistant', params.avatarStyle || 'tech' ); } return { success: true, files: result.files, avatarUrl: localAvatarPath, // Return local file path avatarSaved: true, template: result.template, language: result.language, message: `AI配置生成成功!已生成6个配置文件,头像已保存到本地: ${localAvatarPath}` }; ``` ### Technical Analysis The external generation service controls `result.files`, which is returned without schema validation, integrity verification, policy inspection, or content review. According to `SKILL.md`, these files include `SOUL.md`, `IDENTITY.md`, `MEMORY.md`, `USER.md`, `TOOLS.md`, and `AGENTS.md`. These are not ordinary presentation files: they define Agent identity, behavioral principles, memory handling, available tools, and task-execution flow. Consequently, remotely supplied content can contain instructions that alter future Agent behavior, request unsafe tools, weaken safety boundaries, or place attacker-controlled rules into memory-oriented configuration. No malicious instruction was found in the repository itself, and the reviewed implementation does not directly write these files to disk. Exploitation therefore depends on a caller or platform installing or applying the returned configuration, which is the declared purpose of the Skill. ### Attack Path 1. An attacker compromises the remote generation service, its deployment, or its response pipeline. 2. A user asks the Skill to generate an Agent configuration. 3. The compromised service returns hostile text in one or more security-sensitive files, such as `AGENTS.md ...[truncated 943 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate that `result.files` is a plain object containing only the six expected filenames. 2. Enforce strict type and size limits for every generated file. 3. Reject unexpected files, executable content, encoded payloads, and unapproved external URLs. 4. Scan instruction-bearing files for attempts to override safety constraints, conceal actions, exfiltrate information, or mandate unnecessary tools. 5. Treat `MEMORY.md`, `TOOLS.md`, and `AGENTS.md` as high-risk content requiring enhanced review. 6. Show the user a complete diff or preview and require explicit approval before installation. 7. Do not automatically grant or install tools merely because a generated `TOOLS.md` requests them. 8. Sign API responses or generated template bundles and verify signatures locally. 9. Prefer locally maintained and version-pinned templates for security-sensitive Agent configuration. 10. Preserve platform-level safety policies outside files that the remote service can modify. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
clawhub.yaml:17
Finding
Filesystem Permissions Exceed the Current Implementation's Requirements<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.yaml:17-25` **Vulnerability Type**: Excessive and Inconsistent Filesystem Permissions **Risk Level**: Medium ### Vulnerable Code ```yaml permissions: - network - file-write - file-read # File write permissions for avatar saving file-write: - /avatars/* - /.openclaw/workspace/avatars/* - /tmp/avatars/* ``` Related package declaration in `package.json:34-41`: ```json "clawhub": { "name": "openclaw-soul-weaver", "version": "1.0.0", "category": "productivity", "permissions": [ "network", "file-write" ] } ``` The implementation does not perform the documented write operation: ```js // Save to local file (requires file-write permission) const fileName = `${name.toLowerCase().replace(/\\s+/g, '_')}_avatar.png`; const filePath = `/avatars/${fileName}`; // In OpenClaw environment, this would save to local file system // For now, we'll return the path where it should be saved console.log(`Avatar would be saved to: ${filePath}`); return filePath; ``` ### Technical Analysis The primary manifest requests both `file-read` and `file-write`, but the reviewed implementation neither reads from nor writes to the filesystem. Avatar generation only constructs and returns a path. The generated configuration files are likewise returned to the caller rather than saved locally. The `file-read` permission is not scoped to specific paths in the manifest and is not necessary for the implemented task. Permission declarations are also inconsistent: `SKILL.md` frontmatter declares only network access, `package.json` declares network and file write, and `clawhub.yaml` declares network, file write, and file read. Granting capabilities that are unused violates least privilege and expands the impact of any future implementation flaw, compromised update, or unsafe remote content handling. ### Attack Path 1. The platform installs the Skill and grants permissions based on the broadest manife ...[truncated 802 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `file-read` and `file-write` permissions from all manifests while the implementation performs no filesystem operations. 2. Make permission declarations consistent across `SKILL.md`, `package.json`, and `clawhub.yaml`. 3. If avatar saving is later implemented, request write-only access to a narrowly scoped, user-selected workspace directory. 4. Do not request read access solely to use templates already packaged with the Skill unless the runtime specifically requires it. 5. Require explicit confirmation before overwriting any existing configuration or avatar file. 6. Correct `avatarSaved: true` and the documentation claiming permanent local storage until a verified write operation exists. 7. Add tests confirming that the Skill cannot access paths outside its explicitly approved output directory. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (36)

Credential Access

High
Category
Privilege Escalation
Content
build/

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The changelog states permissions of network, file-write, and file-read, while the provided manifest metadata declares only network. Permission inconsistencies are dangerous because they can conceal the skill's true access requirements and undermine trust, review accuracy, and user understanding of what the skill may do.

Vague Triggers

High
Confidence
97% confidence
Finding
The automatic trigger phrases are broad, generic, and overlap with normal conversation such as 'create ai agent' or 'generate soul'. In an agent ecosystem, this can cause the skill to activate unexpectedly, leading to unintended network submission of user prompts and possible generation or replacement of configuration artifacts without meaningful user intent verification.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill advertises itself primarily as a conversational configuration generator, but the documentation reveals materially different behavior: sending user data to a remote backend, generating images, and saving files locally. This mismatch undermines informed consent and makes it easier for users or orchestrators to invoke the skill without realizing it performs external data transfer and local persistence.

Scope Creep

High
Confidence
97% confidence
Finding
The documentation states that avatar images are downloaded and saved to the local filesystem, but the manifest only declares network permission. Undeclared local-write behavior is a security issue because it bypasses permission transparency and could lead to unexpected persistence of generated or remote content on disk.

Missing User Warnings

High
Confidence
94% confidence
Finding
The description explicitly says it can replace system files to 'instantly professionalize' OpenClaw, but the manifest does not present a clear user warning, scope limitation, or safety control around that behavior. In context, this is especially dangerous because the skill also has file-write permission, making system-impacting modifications sound routine and low-friction.

Lp1

High
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill reads process.env.API_BASE_URL even though only network permission is declared, creating a capability/permission mismatch. This is dangerous because undeclared environment access can hide configuration-based behavior changes, including redirection to attacker-controlled endpoints, and reduces transparency for users and reviewers.

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The code claims the avatar is saved locally and returns a local path, but it never writes the file and only logs a hypothetical destination. This is dangerous because it misrepresents what the skill actually did, which can mislead downstream components or users into trusting nonexistent local artifacts and conceal the real network-only behavior.

Scope Creep

High
Confidence
98% confidence
Finding
The package metadata requests an additional `file-write` permission that is not declared in the top-level skill metadata presented for review, creating a permission mismatch. This is dangerous because it can mislead reviewers or users about the skill's effective capabilities and, if the runtime trusts the in-package manifest, enable local file modification beyond the expected network-only scope.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The changelog describes capabilities beyond the user-facing metadata, including generating multiple files, ZIP export, and avatar/image API integration. This mismatch can mislead users and reviewers about the skill's real behavior, reducing informed consent and making it easier for risky file and network actions to occur unexpectedly.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The documented generation of six configuration files and ZIP export implies modification of the user's workspace and creation of packaged artifacts, but the changelog does not warn about these side effects. That omission can lead to unexpected file creation, overwrites, or persistence of sensitive generated content.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The changelog advertises API integration and image generation features but does not warn users that prompts or related data may be sent to an external service. Without clear disclosure, users may unknowingly expose sensitive content to third parties, especially in a skill centered on generating personalized configurations.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The phrase 'Multiple pattern-based auto-triggers' is overly broad and does not explain what inputs activate the skill or what actions will follow. In a skill with network and documented file-generation behavior, vague triggering increases the chance of unintended activation and actions occurring without clear user intent.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The README describes use of an external API endpoint and file-writing behavior but does not clearly disclose that user inputs and generated configuration content may be transmitted to a third-party service and written into local configuration files. Because this skill creates identity, memory, and tool configuration artifacts, the data involved may be sensitive, and hidden transmission or writes could expose private information or alter agent behavior in ways the user does not expect.

Scope Creep

Medium
Confidence
97% confidence
Finding
The README claims the skill needs file-read and file-write capabilities even though the metadata declares only network permission. This permission/documentation mismatch is dangerous because users may be misled about what the skill can do, and the skill’s stated purpose explicitly includes replacing or saving system/configuration files, which raises the risk of unauthorized file modification or a later manifest escalation slipping past users.

Description-Behavior Mismatch

Medium
Confidence
87% confidence
Finding
The skill is presented as a configuration generator, yet it also documents a separate avatar-generation workflow with image generation and local download. This expansion of scope increases attack surface and user surprise, especially where image generation may call distinct endpoints and create persistent artifacts not implied by the primary description.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The auto-invocation rule is broad enough to match normal user requests about creating an AI assistant, which could cause the skill to trigger unexpectedly. In context, that matters because the skill can send user-provided profile data to an external service and may produce files or configurations without the user intentionally selecting this skill.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The API usage section documents transmitting user information such as names, profession, use case, and communication style to an external domain, but it does not clearly warn users that their data leaves the local environment. This creates a privacy and consent risk, especially because the skill frames itself as a natural conversational generator rather than an external data-processing service.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
Defaulting the API language to Chinese without explicit user selection is primarily a policy and user-expectation issue rather than a direct exploit path, but it can still lead to unintended processing choices and confusing outputs. In a skill that transmits data externally, silent defaults reduce user control over how requests are represented and handled.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The documentation says avatar images will be downloaded and permanently saved locally, but it does not present a clear warning or consent flow for local persistence. Unexpected file writes can create privacy, storage, and trust issues, particularly when generated content may be retained beyond the user’s intent.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger patterns are broad enough to match many generic requests about creating AI agents or assistants, including multilingual phrases, which can cause the skill to activate outside its intended scope. Overbroad activation is risky here because the skill also has network and file-write permissions, so accidental invocation could lead to unexpected data transmission or file generation.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The manifest declares external API endpoints for text and image generation but provides no user-facing notice that prompts, configuration content, or related data may be sent to third-party services. This is problematic because users may provide sensitive professional or personal details while 'natural conversation' generation occurs, creating undisclosed privacy and confidentiality risk.

Context-Inappropriate Capability

Medium
Confidence
84% confidence
Finding
The skill’s stated purpose is generating OpenClaw configurations, but it also requires find-skills, autoclaw, and brave-search, which expand its capabilities beyond simple local templating. That mismatch increases the attack surface and could enable unnecessary external discovery or automated follow-on actions that users would not reasonably expect from a config generator.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The config sets "language": "ZH", which imposes a specific language preference as a default policy choice. Under the policy criteria, forcing a specific language without offering user choice or documenting a justified region-specific constraint is a natural-language policy violation.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
index.js:7