T09 · Insecure Skill Coding Practices
- Location
lib/modelSelector.js:169- Finding
Arbitrary JavaScript Execution Through Unsafe Configuration Parsing
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real multi-agent research orchestrator, but it needs Review because unsafe config parsing and path handling could let local files execute code or write outside the intended workspace.
Install only if you are comfortable reviewing and trusting the code. Before use, remove the eval fallback in lib/modelSelector.js, validate agent and workflow identifiers, and treat archive_and_clean as destructive for shared workspace files. Expect persistent local files under ~/.openclaw/workspace, including profiles, model settings, capability data, logs, archives, and reports.
lib/modelSelector.js:169Arbitrary JavaScript Execution Through Unsafe Configuration Parsing
lib/archiver.js:47Archive Directory Traversal Through Unvalidated Workflow Identifier
index.js:399Agent Name Path Traversal in Workspace and Report Paths
Persistent storage of capability data, reasoning-support detection, response analysis, and override management are materially different from the orchestrator features claimed in the manifest. This makes the skill more dangerous because it can silently build and maintain local behavioral profiles or control matrices while presenting itself as a simple research/orchestration tool.
Persistent storage of capability data, reasoning-support detection, response analysis, and override management are materially different from the orchestrator features claimed in the manifest. This makes the skill more dangerous because it can silently build and maintain local behavioral profiles or control matrices while presenting itself as a simple research/orchestration tool.
Persistent storage of capability data, reasoning-support detection, response analysis, and override management are materially different from the orchestrator features claimed in the manifest. This makes the skill more dangerous because it can silently build and maintain local behavioral profiles or control matrices while presenting itself as a simple research/orchestration tool.
Persistent storage of capability data, reasoning-support detection, response analysis, and override management are materially different from the orchestrator features claimed in the manifest. This makes the skill more dangerous because it can silently build and maintain local behavioral profiles or control matrices while presenting itself as a simple research/orchestration tool.
Persistent storage of capability data, reasoning-support detection, response analysis, and override management are materially different from the orchestrator features claimed in the manifest. This makes the skill more dangerous because it can silently build and maintain local behavioral profiles or control matrices while presenting itself as a simple research/orchestration tool.
Persistent storage of capability data, reasoning-support detection, response analysis, and override management are materially different from the orchestrator features claimed in the manifest. This makes the skill more dangerous because it can silently build and maintain local behavioral profiles or control matrices while presenting itself as a simple research/orchestration tool.
Persistent storage of capability data, reasoning-support detection, response analysis, and override management are materially different from the orchestrator features claimed in the manifest. This makes the skill more dangerous because it can silently build and maintain local behavioral profiles or control matrices while presenting itself as a simple research/orchestration tool.
Built-in agent templates assign the exec capability to technical and developer roles, expanding the skill from orchestration/research into arbitrary command execution. If downstream prompt construction or task inputs are user-controlled, spawned agents may be induced to run shell commands, enabling workspace tampering, secret exposure, or host-level actions beyond the skill's stated purpose.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
prompt += `背景: ${context.goal}\n\n`;
}
return prompt;
}
/**
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
prompt += `背景: ${context.goal}\n\n`;
}
return prompt;
}
/**
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
prompt += `背景: ${context.goal}\n\n`;
}
return prompt;
}
/**
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
prompt += `背景: ${context.goal}\n\n`;
}
return prompt;
}
/**
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
prompt += `背景: ${context.goal}\n\n`;
}
return prompt;
}
/**
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
instructions += `- (无法读取共享目录)\n`;
}
return instructions;
}
/**
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
instructions += `- (无法读取共享目录)\n`;
}
return instructions;
}
/**
The docstring advertises 'active polling,' '1 hour timeout handling,' status logging per poll, and 'sessions_send message traceability.' However, the function never loops, never waits until timeout, never uses POLL_INTERVAL_MS or TIMEOUT_MS, and does not verify any message routing; it only validates existing report files once and returns.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
*/
function inferTier(modelId, cost) {
const rules = loadRules();
if (rules?.tiers?.[modelId]) return rules.tiers[modelId];
// 免费模型
if (modelId.includes(':free') || modelId === 'openrouter/free') return 'free';
The selector falls back to (0, eval)('(' + configRaw + ')') when JSON parsing fails, which executes attacker-controlled JavaScript from ~/.openclaw/openclaw.json. A model selector only needs to parse configuration data, so introducing code execution here is unjustified and turns a malformed or tampered local config into arbitrary code execution in the Node.js process.
The skill advertises command-driven behavior and the static analysis indicates environment-access capability, but the manifest declares no explicit tool scope or permissions. In an agent ecosystem, undeclared access increases the chance of over-privileged execution and prevents users or policy engines from understanding what the skill can inspect.
The manifest describes a multi-agent orchestrator for research, decomposition, parallel execution, validation, and decisions. However, this file inspects process.env values like OPENCLAW_VERSION, USERPROFILE, and HOME and performs filesystem permission probing by creating and deleting directories before any user command runs, which are host-environment introspection capabilities beyond the core orchestration role.
The run guide explicitly sets the output language to "zh-CN", which imposes a specific locale on users. The file otherwise does not provide any opt-in, override, or justification for requiring Chinese output, so this is a natural-language locale policy violation.
This JavaScript file contains natural-language comments, template names, section names, status strings, and formatted report output exclusively in Chinese, indicating the skill is designed to operate in a fixed language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.
The main entry point automatically calls cleanShared() immediately after archiving, which recursively deletes all files under the shared workspace without any confirmation, safety interlock, or scope restriction visible to the caller. In a multi-agent orchestrator, shared/ is a high-value working area; unexpected cleanup can destroy in-progress artifacts, erase forensic evidence, or remove files another concurrent workflow still depends on.
This JavaScript file contains user-facing natural-language descriptions, prompts, and instructions entirely in Chinese, including task prompts and feedback text. Because the skill does not offer users a language/locale option or justify a Chinese-only constraint, it may violate a language/locale policy requiring user opt-in.
The file-level documentation claims the system can automatically complete configuration after user consent, but the implementation only auto-creates directories and never creates the required JSON config files it flags as missing. This mismatch can mislead users and higher-level automation into believing the environment is fully prepared, causing failed execution or unsafe operator assumptions about what was configured.
Detected: suspicious.dynamic_code_execution