Back to skill

Security audit

Remote Skill Installer

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it can persistently install or overwrite active agent instructions from remote sources without strong trust checks or clear confirmation.

Install only if you are comfortable with this tool changing active OpenClaw agent skills. Use trusted, pinned, reviewed sources; avoid arbitrary URLs and mutable branches; inspect diffs before updates; be cautious with OPENCLAW_SKILLS_HUB_BASE and ~/.openclaw/skills-hub-url; and avoid automatic mirror fallback for official imports unless content is independently verified.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (5)

T03 · Remote Payload Retrieval and Execution

Error
Location
remote_skill_installer.py:89
Finding

Arbitrary Remote Agent Instruction Installation

Content
View full analysis
bool: """从远程 URL 安装 skill""" if not safe_name(agent_id) or not safe_name(name): print(f'❌ 错误:agent_id 或 skill 名称含非法字符') return False if not validate_url(source_url): print(f'❌ 错误:URL 不合法或指向内网地址') return False workspace = OCLAW_HOME / f'workspace-{agent_id}' / 'skills' / name workspace.mkdir(parents=True, exist_ok=True) skill_md = workspace / 'SKILL.md' print(f'⏳ 正在从 {source_url} 下载...') try: content = _download_file(source_url) except Exception as e: print(f'❌ 下载失败:{e}') return False if len(content.strip()) < 10: print(f'❌ 文件内容过短或为空') return False skill_md.write_text(content, encoding='utf-8') source_info = { 'skillName': name, 'sourceUrl': source_url, 'description': description, 'addedAt': now_iso(), 'lastUpdated': now_iso(), 'checksum': _compute_checksum(content), 'status': 'valid', } ``` ### Technical Analysis The `add` command accepts any URL that passes a limited URL check, downloads its content, and writes the result directly to an Agent's active `SKILL.md` location. It does not restrict downloads to approved publishers, pin content to an immutable revision, verify a publisher signature, compare against a trusted digest, scan the downloaded instructions, or require a separate approval step before activation. Although the downloaded artifact is Markdown rather than a native executable, `SKILL.md` controls Agent behavior. Installing attacker-controlled instructions into an active workspace therefore creates a remote instruction-payload channel. The effective payload can include requests to a ...[truncated 1474 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
remote_skill_installer.py:181
Finding

Mutable Source Updates Allow Post-Review Payload Replacement

Content
View full analysis
bool: """更新远程 skill""" if not safe_name(agent_id) or not safe_name(name): print(f'❌ 错误:agent_id 或 skill 名称含非法字符') return False workspace = OCLAW_HOME / f'workspace-{agent_id}' / 'skills' / name source_json = workspace / '.source.json' if not source_json.exists(): print(f'❌ 技能不存在或不是远程 skill: {name}') return False try: source_info = json.loads(source_json.read_text(encoding='utf-8')) source_url = source_info.get('sourceUrl') if not source_url: print(f'❌ 无效的源 URL') return False return cmd_add(agent_id, name, source_url, source_info.get('description', '')) except Exception as e: print(f'❌ 更新失败:{e}') return False ``` ### Technical Analysis The update process reads the original mutable URL from `.source.json` and passes it back to `cmd_add()`. The newly downloaded content replaces the active Skill without checking whether it matches an approved version or trusted digest. There is also no publisher authentication, review step, or diff confirmation. Consequently, an initially benign Skill may change after installation. Compromise of the source account, repository, web server, DNS path, or hosting infrastructure can convert a previously reviewed source into a malicious instruction payload. ### Attack Path 1. A user installs and reviews a benign Skill from a mutable URL. 2. The source owner or an attacker who compromises the source replaces its content. 3. The user or an automated process runs the `update` command. 4. The installer retrieves the changed content from the stored URL. 5. `cmd_add()` overwrites the active `SKILL.md`. 6. The affected Agent subsequently loads the replacement ins ...[truncated 551 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
remote_skill_installer.py:258
Finding

Automatic Third-Party Mirrors Can Replace Official Skill Content

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
remote_skill_installer.py:40
Finding

SSRF Validation Can Be Bypassed Through DNS Resolution and Redirects

Content
View full analysis
bool: """校验 URL 合法性,防 SSRF""" from urllib.parse import urlparse import ipaddress try: parsed = urlparse(url) if parsed.scheme not in ('https', 'http'): return False if not parsed.hostname: return False # 禁止内网地址 try: ip = ipaddress.ip_address(parsed.hostname) if ip.is_private or ip.is_loopback or ip.is_reserved: return False except ValueError: pass return True except Exception: return False def _download_file(url: str, timeout: int = 30, retries: int = 3) -> str: """从 URL 下载文件内容,支持重试""" last_error = None for attempt in range(1, retries + 1): try: req = urllib.request.Request(url, headers={'User-Agent': 'OpenClaw-SkillInstaller/1.0'}) with urllib.request.urlopen(req, timeout=timeout) as resp: content = resp.read(10 * 1024 * 1024) return content.decode('utf-8') ``` ### Technical Analysis The validation rejects certain private or special addresses only when the URL hostname is already an IP literal. If the hostname is a domain, `ipaddress.ip_address()` raises `ValueError`, and the code accepts it without resolving and validating its addresses. `urllib.request.urlopen()` also follows redirects, but redirect destinations are not passed back through `validate_url()`. This permits several SSRF techniques: - A public domain that resolves to a private, loopback, or link-local address. - DNS rebinding between validation and connection. - An accepted public endpoint that redirects to an internal service. - Use of plain HTTP, which also permits network-path tampering. The response is persisted as `SKILL.md`. Altho ...[truncated 1374 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
remote_skill_installer.py:112
Finding

Stored Checksum Does Not Verify Download Integrity

Content
View full analysis
str: """计算内容校验和""" return hashlib.sha256(content.encode()).hexdigest()[:16] ``` ```python source_info = { 'skillName': name, 'sourceUrl': source_url, 'description': description, 'addedAt': now_iso(), 'lastUpdated': now_iso(), 'checksum': _compute_checksum(content), 'status': 'valid', } source_json = workspace / '.source.json' source_json.write_text(json.dumps(source_info, ensure_ascii=False, indent=2), encoding='utf-8') ``` ### Technical Analysis The installer calculates a checksum only after receiving the untrusted content and stores the result as metadata. It never compares that value with an independently trusted expected digest during installation or update. The digest is also truncated to 16 hexadecimal characters, providing only 64 bits of representation. More importantly, even a full digest would not provide authenticity if it were computed solely from the content supplied by the potentially compromised source. The documentation describes this behavior as checksum-based integrity assurance, but the implementation merely fingerprints whatever bytes were received. A malicious source or mirror receives a new checksum and the status `"valid"` just like legitimate content. ### Attack Path 1. A source server, mirror, DNS path, or network route is compromised. 2. Modified Skill content is returned to the installer. 3. The installer computes a checksum over the modified content. 4. The newly generated checksum is stored alongside the malicious Skill. 5. No mismatch is generated because there is no trusted reference value. 6. Users may rely on the metadata and incorrectly assume the content was authenticated. ### Impact Assessment This flaw does not independently grant privil ...[truncated 333 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (16)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code calls shutil.rmtree(workspace), which is a destructive and irreversible filesystem operation. Although it prints a success message afterward, there is no prior confirmation or explicit warning before deletion, so users may trigger data loss unintentionally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README promotes remote installation from arbitrary URLs and bulk import into agent workspaces, but it does not prominently warn that this writes untrusted remote content into local skill directories. In the context of agent skills, this is dangerous because users may install prompt/content/code that changes agent behavior or introduces malicious instructions without understanding the trust boundary.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 36)May include surrounding context.

md
python3 remote_skill_installer.py add \
  --agent bingbu \
  --name code_review \
  --source https://example.com/skills/code_review/SKILL.md

# 查看已安装的远程 skills
python3 remote_skill_installer.py list

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 69)May include surrounding context.

md
python3 remote_skill_installer.py add \
  --agent bingbu \
  --name code_review \
  --source https://example.com/skills/code_review/SKILL.md

# 查看已安装的远程 skills
python3 remote_skill_installer.py list

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill encourages downloading and installing remote content directly into agent workspaces without prominently warning that the content is untrusted, may change files, and may affect agent behavior. In this context, missing trust and file-modification warnings materially increases the chance that users install malicious or unsafe skills from arbitrary URLs.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

python3 remote_skill_installer.py add \ --agent menxia \ --name my_skill \ --source https://example.com/skills/my_skill/SKILL.md

text

**参数说明:**

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

解决方案:

bash
# 检查 URL 是否正确
curl -I https://raw.githubusercontent.com/org/skills/main/SKILL.md

# 使用官方 Skills Hub
python3 remote_skill_installer.py import --agents menxia

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The stated SSRF protection is incomplete because it only lists a few blocked private ranges and does not cover the broader set of dangerous targets such as localhost variants, IPv6 loopback/link-local, metadata endpoints, DNS rebinding cases, and alternative IP encodings. In a remote installer context, weak URL validation can allow access to internal services or cloud instance metadata through crafted source URLs.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill claims a SHA256 integrity check, but the document only mentions storing source metadata and checksums, not verifying the downloaded skill against a trusted checksum or signature from an independent source. If users rely on this claim, a tampered remote SKILL.md could still be installed while appearing protected, creating a misleading security guarantee.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Docstrings, help text, and runtime messages are consistently presented in Chinese, with no opt-in or alternate locale support. This is a natural-language policy issue because the tool imposes a specific language on all users regardless of preference or environment.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The comment says the function validates URLs 'to prevent SSRF', which implies meaningful restriction of outbound request targets. In practice it only blocks obvious private/loopback IP literals and still allows arbitrary external URLs, plus other code later accepts a hub base from a local file or environment variable, so the documentation overstates the protection actually provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code performs a network download and writes both SKILL.md and .source.json to disk, but the user-facing output only reports progress and success after the action. There is no confirmation prompt or explicit warning that adding or updating a skill will modify local files under ~/.openclaw, which is a safety-relevant side effect.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The import flow is presented as pulling from an official Skills Hub, but _get_hub_url silently trusts a local file or environment variable to replace the hub base with any URL. This creates a trust-boundary violation: a user invoking 'official' import may unknowingly install attacker-controlled remote content if their environment or local config has been tampered with.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Natural-language policy violations apply to all file types, including markdown. This skill documentation forces a specific language presentation and does not offer an alternative language or indicate that the skill is intentionally region-specific, which can violate organizational language/locale choice expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The removal command omits a warning that it deletes installed skill files from the agent workspace. While less severe than remote installation, this can still lead to accidental destructive actions or loss of locally modified skill content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The installer accesses OPENCLAW_SKILLS_HUB_BASE to determine where remote skill content is fetched from. While this is not necessarily unsafe by itself, the code lacks any user-facing notice that environment configuration can redirect downloads, which affects trust and provenance of installed content.

Content

No source excerpt is available for this finding.