Back to skill

Security audit

skill-isolator

Security checks for vulnerabilities and agentic risk

Overview

This skill is a project skill manager, but a project-controlled config can make its sync script run unintended shell commands during installation.

Install only after reviewing and fixing the sync script. Do not run it in untrusted repositories or against shared/downloaded `.openclaw-skills.json` files until skill names and versions are strictly validated and the installer uses argument-array execution instead of a shell string. Treat auto-sync, `--force`, and mutable remote config examples as unsafe defaults that need explicit review and approval.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sync-project-skills.js:127
Finding
Command Injection Through Project-Controlled Skill Names and Versions<![CDATA[ ## Vulnerability Details **File Location**: `scripts/sync-project-skills.js:127-140`; insufficient validation in `scripts/validate-config.js:137-151` **Vulnerability Type**: OS command injection **Risk Level**: High ### Vulnerable Code ```js function installFromClawhub(skillName, version, force = false) { try { log(`📦 Installing ${skillName} from clawhub...`); const versionSpec = version && version !== 'latest' ? `@${version}` : ''; const forceFlag = force ? ' --force' : ''; const cmd = `clawhub install ${skillName}${versionSpec}${forceFlag}`; execSync(cmd, { stdio: 'inherit', cwd: process.cwd(), env: { ...process.env, FORCE_COLOR: '1' } }); log(`✅ Installed ${skillName}`); return true; } catch (err) { log(`❌ Failed to install ${skillName}: ${err.message}`, 'error'); return false; } } ``` The validator accepts arbitrary non-empty strings without restricting shell metacharacters: ```js if (typeof skill === 'string') { if (!skill.trim()) { errors.push(`${skillPath}: skill name cannot be empty`); } } else if (typeof skill === 'object') { if (!skill.name) { errors.push(`${skillPath}: missing required field "name"`); } if (skill.version && typeof skill.version !== 'string') { errors.push(`${skillPath}.version: must be a string`); } } ``` ### Technical Analysis The `skillName` and `version` values originate from `.openclaw-skills.json`, which may be supplied by an untrusted project or downloaded configuration. These values are directly interpolated into a command string passed to `child_process.execSync()`. By default, `execSync()` executes its string through a platform shell. Shell control characters embedded in either field can therefore terminate or alter the intended `clawhub install` command and introduce an additional command. Type and emptiness checks do not prevent this because malicious values remain valid JSON strings. The synchroniza ...[truncated 1871 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace shell-based execution with an argument-array API: ```js const { execFileSync } = require('child_process'); const packageSpec = version && version !== 'latest' ? `${skillName}@${version}` : skillName; const args = ['install', packageSpec]; if (force) args.push('--force'); execFileSync('clawhub', args, { stdio: 'inherit', cwd: process.cwd(), env: { ...process.env, FORCE_COLOR: '1' }, shell: false }); ``` 2. Enforce strict allow-list validation for skill names and versions. Reject whitespace, path separators, shell metacharacters, control characters, and unexpected package syntax. 3. Perform validation inside `loadConfig()` so synchronization cannot bypass it. 4. Require every skill object to contain a non-empty string `name`; reject arrays, nested objects, and unexpected fields where practical. 5. Resolve and display the selected configuration path, then request confirmation before processing a configuration from a parent directory or newly cloned repository. 6. Add security regression tests containing shell metacharacters in both `name` and `version` and verify that no secondary command is executed. 7. Consider running third-party installation in a restricted subprocess or sandbox with minimal filesystem, credential, and network access. ]]>

T08 · Insecure Dependencies

Warning
Location
references/faq.md:174
Finding
Unsafe Supply-Chain Guidance Bypasses Suspicious-Package Warnings and Trusts Mutable Remote Configuration<![CDATA[ ## Vulnerability Details **File Location**: `references/faq.md:174-178`; `references/tutorials.md:333-356` **Vulnerability Type**: Unverified third-party package and configuration installation **Risk Level**: Medium ### Vulnerable Guidance The FAQ recommends forcing installation when a skill has been marked suspicious: ```bash clawhub install <skill-name> --force ``` The tutorial downloads a mutable configuration from a branch and immediately uses it for synchronization: ```bash curl -O https://raw.githubusercontent.com/team-name/shared-skills/main/frontend-standard.json cp frontend-standard.json .openclaw-skills.json node /path/to/sync-project-skills.js ``` It also proposes automating the same behavior: ```bash if [ "$PROJECT_TYPE" = "frontend" ]; then curl -O https://raw.githubusercontent.com/team-name/shared-skills/main/frontend-standard.json cp frontend-standard.json .openclaw-skills.json elif [ "$PROJECT_TYPE" = "backend" ]; then curl -O https://raw.githubusercontent.com/team-name/shared-skills/main/backend-standard.json cp backend-standard.json .openclaw-skills.json else echo "Usage: $0 <frontend|backend>" exit 1 fi node /path/to/sync-project-skills.js ``` ### Technical Analysis The `--force` recommendation explicitly bypasses a security warning without requiring investigation, provenance verification, or review of the flagged skill. The shared-configuration workflow downloads files from the mutable `main` branch. The effective content can change after the documentation or project has been reviewed. The workflow performs no signature, checksum, immutable commit, or content verification before copying the file to `.openclaw-skills.json` and invoking synchronization. Because the synchronization process installs skills named by this configuration, compromise of the source repository or maintainer account can alter the installed components. In addition, a malicious configuration can supply the command-injection values descr ...[truncated 1643 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the blanket recommendation to install suspicious skills with `--force`. 2. Require users to inspect the warning reason, publisher identity, source content, requested capabilities, and release history before overriding a warning. 3. Pin downloaded GitHub content to an immutable commit hash instead of a mutable branch: ```text https://raw.githubusercontent.com/<owner>/<repository>/<commit-hash>/frontend-standard.json ``` 4. Publish and verify a cryptographic checksum or signature for every shared configuration. 5. Download to a temporary file, validate it, show the proposed changes, and require explicit approval before replacing `.openclaw-skills.json`. 6. Apply strict schema and value validation before synchronization, including the allow-list protections required for the command-injection finding. 7. Pin skill versions in team configurations and verify registry package provenance or signatures. 8. Add organizational controls such as an approved-skill allow list and a trusted internal mirror. 9. Document rollback and incident-response procedures for compromised shared configurations or registry packages. ]]>
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (46)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The documentation materially overstates what the skill does and how safely it does it, including claims about automatic loading, source support, priority handling, version locking, and isolation that are not actually implemented. This can mislead users into trusting security and isolation properties they do not have, increasing the chance of unsafe installation, cross-project contamination, or unreviewed remote skill use.

Ae1

High
Category
analysis-evasion
Content
node scripts/validate-config.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/validate-config.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/validate-config.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/validate-config.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/validate-config.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/validate-config.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/validate-config.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# 编辑 .openclaw-skills.json,删除对应技能

# 方法 2:手动删除
rm -rf ~/.openclaw/skills/<skill-name>
```

### Q13: 支持哪些技能来源?
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# 编辑 .openclaw-skills.json,删除对应技能

# 方法 2:手动删除
rm -rf ~/.openclaw/skills/<skill-name>
```

### Q13: 支持哪些技能来源?
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# 编辑 .openclaw-skills.json,删除对应技能

# 方法 2:手动删除
rm -rf ~/.openclaw/skills/<skill-name>
```

### Q13: 支持哪些技能来源?
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
node scripts/sync-project-skills.js --force

# 方法 2:删除缓存文件
rm ~/.openclaw/cache/skills.json

# 方法 3:修改配置 TTL
{
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
node scripts/sync-project-skills.js --force

# 方法 2:删除缓存文件
rm ~/.openclaw/cache/skills.json

# 方法 3:修改配置 TTL
{
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
git add .openclaw-skills.json
git commit -m "Add skill configuration for frontend development"
git push
```

**完成!** ✅ 现有项目现在有了技能配置。
Confidence
70% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
git add .openclaw-skills.json
git commit -m "Add skill configuration for frontend development"
git push
```

**完成!** ✅ 现有项目现在有了技能配置。
Confidence
70% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README advertises automatic installation and syncing of skills when entering a project, which is a system-changing action triggered by project context rather than an explicit user command. In a tool that supports multiple sources including git and URL, this increases supply-chain and surprise-execution risk because users may enter an untrusted repository and unintentionally pull or install skills without a clear warning or consent step.

Lp3

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding
The skill describes behavior that can inspect environment context and drive filesystem/network-affecting operations, but it does not declare any explicit tool scope such as allowed tools or permissions. That omission weakens user understanding and policy enforcement, making it easier for the skill to operate with broader-than-expected capabilities in environments that rely on metadata for safety decisions.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The skill body switches to Chinese for the primary instructions and explanations, while the file does not offer alternative language options or indicate that the skill is intentionally region- or locale-specific. This can violate a language/locale policy requiring user choice or explicit justification.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill promotes automatic detection and installation of missing skills but does not clearly warn that this causes local file changes and may fetch content from configured sources. Users may trigger downloads and installation side effects without informed consent, which is risky when skills are executable instructions from potentially untrusted origins.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation explicitly supports URL-based skill downloads without warning about remote content trust, tampering, or supply-chain risks. Fetching and installing skills from arbitrary URLs can introduce malicious or modified skill content into the local environment if integrity and provenance are not verified.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This markdown file uses a single fixed language throughout and does not state that Chinese is optional or intended for a specific locale. Under the policy rule for natural-language violations, forcing a specific language without user opt-in is reportable.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The example enables automatic synchronization both when entering a project and when a skill is missing, which can cause remote or local skill resolution to occur without an explicit user approval step. In the context of a skill loader that supports registry, filesystem, git, and URL-like sources, broad auto-sync triggers increase the chance of unintentionally fetching or activating untrusted code when a project is opened or when dependency names are manipulated.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The FAQ advises users to bypass a suspicious-skill warning with `--force` and gives no caution about the trust implications. In the context of a skill manager that installs project-scoped skills, this normalizes overriding security checks and can directly lead to installing malicious skills from untrusted sources.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The uninstall instructions include `rm -rf ~/.openclaw/skills/<skill-name>`, and the cache troubleshooting section includes `rm ~/.openclaw/cache/skills.json`, but the document provides no caution that these commands delete local data and may be irreversible. For markdown guidance, destructive operations that affect user data or system state should be accompanied by an explicit warning.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The table states `git` and `url` sources are 'planned' (`计划中`), indicating they are not implemented. However, the later advanced usage section provides a concrete project configuration using `type: "git"` as if it were supported, which directly contradicts the earlier documentation about implementation status.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.destructive_delete_command

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/sync-project-skills.js:135

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
references/faq.md:188