Back to skill

Security audit

Skill 自动沉淀

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned but should be reviewed because it automatically creates or updates persistent skills and runs a publish command without clear user approval gates.

Install only if you want an agent to automatically turn completed tasks into reusable skills. Before using it, require manual confirmation before creating, updating, or publishing any skill, review the generated content for secrets or private details, and limit duplicate checks to explicit skill metadata where possible.

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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:3
Finding

Automatic Post-Task Workflow Hijacks the Agent's Current Objective

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 3-17
Vulnerability Type: Automatic instruction and workflow hijacking
Risk Level: High

Vulnerable Snippet

The following is an English translation of the relevant Skill instructions:

text
Description: Automatically save task experience as a Skill. Trigger when the
task used five or more tool calls, a correct solution was found after an
error, the user corrected the method, or a reusable multi-step workflow was
discovered. After completing the task, automatically evaluate whether it is
worth saving, check existing Skills for duplicates, and create a new Skill
or update an existing Skill.

After the task is completed, evaluate whether to save the experience as a
Skill and publish it.

After task completion, trigger an evaluation if any of these conditions apply:

1. Five or more tool calls were used.
2. A correct solution was found after encountering an error.
3. The user corrected the method and a new approach was learned.
4. A non-trivial, reusable, multi-step workflow was discovered.

Technical Analysis

The Skill installs a mandatory post-task workflow that is triggered by broad conditions common to ordinary Agent operations. The workflow is not limited to responding to an explicit request to create a Skill. Once loaded, it changes the Agent's current objective from completing the user's task to evaluating, persisting, and potentially publishing information derived from that task.

There is no explicit user-approval gate before the additional workflow starts. The broad triggers, particularly use of five tool calls or discovery of a reusable workflow, can activate during unrelated tasks. This creates instruction-hijacking risk because Skill-level instructions can cause additional tool use and side effects beyond the user's immediate intent.

Attack Path

  1. The Agent loads the Skill while handling an ordinary user task.

...[truncated 848 chars]

Remediation
View remediation

Remediation Suggestions

  • Make the workflow opt-in rather than automatic.
  • Require an explicit user request before evaluating whether task content should become a Skill.
  • Require separate confirmation before every creation, update, or publication action.
  • Clearly state that current user instructions, privacy restrictions, and platform safety policies take precedence.
  • Display a preview of all planned reads, writes, and network-facing operations before execution.
  • Narrow the triggers so routine tool use or error recovery cannot silently activate the workflow.

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:28
Finding

Task-Derived Instructions Can Be Written into Persistent Agent Skill Storage

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 28-55
Vulnerability Type: Persistent Agent-state modification without a review boundary
Risk Level: High

Vulnerable Snippet

The following is an English translation of the relevant instructions; the command is reproduced verbatim:

text
Scan the existing Skill directories and determine whether a similar Skill
already exists.

If no similar Skill exists, create one using the skill-creator process:

python3 /usr/lib/node_modules/openclaw/skills/skill-creator/scripts/init_skill.py <skill-name> --path ~/.openclaw/skills

If a similar Skill already exists, evaluate whether it should be updated by:
- Adding new steps or edge cases.
- Updating obsolete commands or APIs.
- Adding cautions.

Technical Analysis

The workflow writes task-derived material into ~/.openclaw/skills, a persistent location intended to influence future Agent behavior. It also permits updates to existing Skills. Content learned during a task may be incorrect, adversarially supplied, privacy-sensitive, or specific to a single context, yet the instructions contain no provenance validation, sanitization, isolated staging process, or mandatory human review.

This creates a memory-poisoning channel. An attacker does not need direct filesystem access if they can influence task content that the Agent later interprets as reusable experience. Once converted into a Skill, the injected guidance may be loaded in later sessions and continue affecting behavior after the original conversation ends.

Attack Path

  1. An attacker or untrusted document introduces misleading operational guidance during a task.
  2. The Agent completes the task and classifies the guidance as reusable experience.
  3. The autosave workflow creates a new Skill or modifies an existing Skill under ~/.openclaw/skills.
  4. The malicious or inaccurate guidance becomes persistent Agent state.
  5. A late ...[truncated 624 chars]
Remediation
View remediation

Remediation Suggestions

  • Write generated content only to a non-loaded staging directory.
  • Require human review and explicit confirmation before installation or modification of any Skill.
  • Preserve provenance identifying the source task, user approval, creation time, and generated changes.
  • Treat task text, retrieved documents, and tool output as untrusted input.
  • Exclude credentials, personal information, internal paths, and task-specific confidential material.
  • Present a complete diff before updating an existing Skill.
  • Validate generated instructions against a restrictive schema and prohibit commands unrelated to the approved workflow.
  • Provide rollback and version-history mechanisms for every persistent change.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:28
Finding

Duplicate Detection Directs the Agent to Inspect User and System-Wide Skill Directories

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 28-34
Vulnerability Type: Excessive filesystem access beyond a narrowly defined metadata check
Risk Level: Medium

Vulnerable Snippet

The following is an English translation of the relevant instructions:

text
Scan the existing Skill directories and check whether a similar Skill exists:

- ~/.openclaw/skills/
- /usr/lib/node_modules/openclaw/skills/

Compare the name and description to determine whether they cover the same scenario.

Technical Analysis

The Skill directs the Agent to scan both a user-owned directory and a system-wide installation directory. Although the stated comparison only requires Skill names and descriptions, the instruction uses the broader operation “scan” and does not constrain traversal depth, permitted files, symlink handling, or the amount of content that may enter the Agent context.

The system-wide path is outside the user-specific Skill workspace and may contain unrelated packages or instructions. Reading it is not necessarily an operating-system permission bypass, because access remains subject to existing filesystem permissions. However, it violates least-privilege design by requesting access broader than necessary for the primary task and lacks an authorization boundary for system-level discovery.

Attack Path

  1. A routine task activates the automatic Skill evaluation.
  2. The Agent scans ~/.openclaw/skills/ and /usr/lib/node_modules/openclaw/skills/.
  3. An unconstrained implementation recursively reads files rather than only trusted metadata fields.
  4. Unrelated Skill instructions or sensitive local configuration enter the active context.
  5. Malicious content in another accessible Skill may influence duplicate detection or subsequent generated content.

Impact Assessment

The scope includes readable files in the identified user and system-wide Skill directories. Possible impact includes e ...[truncated 308 chars]

Remediation
View remediation

Remediation Suggestions

  • Restrict duplicate detection to explicitly named manifest files and only the name and description fields.
  • Avoid recursive directory traversal and do not read scripts or full instruction bodies for initial comparison.
  • Do not inspect system-wide paths without explicit user authorization.
  • Canonicalize paths and reject symlinks or traversal outside approved directories.
  • Apply file-count and file-size limits.
  • Treat all discovered Skill text as untrusted data rather than executable instructions.
  • Prefer a trusted local index of Skill metadata over direct filesystem scanning.

other

Error
Location
SKILL.md:57
Finding

Task-Derived Skill Content May Be Published Without Explicit User Approval

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 57-61
Vulnerability Type: Unapproved external publication
Risk Level: High

Vulnerable Snippet

The relevant publication instruction and command are:

text
Publish to local sharing:

clawhub publish ~/.openclaw/skills/<skill-name>

Technical Analysis

The workflow instructs the Agent to invoke clawhub publish after creating or updating task-derived Skill content. No separate confirmation, destination verification, authentication-context check, content preview, secret scanning, or privacy review is specified. The description of the action as “local sharing” does not establish that the command is local-only; a publish operation may communicate with a registry or sharing service depending on the installed tool's configuration.

Task-derived Skills may contain copied commands, internal paths, proprietary procedures, user information, credentials, or material obtained from external sources. Publishing such a Skill without informed approval can disclose data outside the original task context.

Attack Path

  1. A user performs a task containing confidential or proprietary operational details.
  2. The autosave workflow identifies the task as reusable.
  3. Those details are incorporated into a new or updated Skill.
  4. The Agent executes clawhub publish without showing the final content and destination to the user.
  5. The Skill becomes available through the publication target configured for clawhub.
  6. Unauthorized parties may obtain the published content according to that target's visibility settings.

Impact Assessment

Potential impact includes disclosure of task-derived content, internal workflows, filesystem paths, personal data, or secrets embedded in the generated Skill. The exact external scope depends on the installed clawhub tool, its authentication state, registry configuration, and publication visibility. The audited ...[truncated 148 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove automatic publication from the post-task workflow.
  • Default to local-only draft creation.
  • Require explicit, informed approval immediately before every publication.
  • Show the complete content, destination, account, namespace, and visibility setting to the user.
  • Perform secret, personal-data, license, and internal-path scanning before publication.
  • Require a second confirmation when the destination is public or organization-wide.
  • Verify the clawhub endpoint and configuration rather than relying on ambiguous “local sharing” terminology.
  • Record an auditable publication receipt and provide an unpublish or revocation procedure.
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to automatically scan local skill directories, create or update files under ~/.openclaw/skills, and publish artifacts via clawhub without requiring explicit user confirmation or warning about side effects. This creates an unsafe automation path where task content may be persisted and redistributed, potentially leaking sensitive data or causing unintended filesystem and publication changes.

Content

No source excerpt is available for this finding.