T09 · Insecure Skill Coding Practices
- Location
scripts/storage-handler.mjs:58- Finding
Shell Command Injection Through Unvalidated Project Names
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly does what it says, but it contains unsafe command and network handling that could expose credentials, user content, or the local agent account if misconfigured or given hostile inputs.
Review this skill before installing. Use it only with trusted prompts and trusted configuration, keep RUNNINGHUB_BASE_URL set to an official RunningHub host, avoid cloud mode for sensitive outputs, and avoid untrusted projectName or outputPath values until the shell command handling and host validation are fixed.
scripts/storage-handler.mjs:58Shell Command Injection Through Unvalidated Project Names
scripts/rh-client.mjs:164API Credentials and User Data Can Be Sent to an Arbitrary Configured Host
scripts/storage-handler.mjs:106Undocumented Arbitrary Output Directory and Unsafe Archive Processing
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
3. **Google Drive**(可选,用于 cloud 存储)
- 安装 gog Skill
- 执行授权:`gog auth credentials /path/to/client_secret.json`
## 配置
This code sends local files, including downloaded and extracted artifacts, to third-party cloud providers via subprocesses without any visible explicit user confirmation or strong restriction on what gets uploaded. In practice, this can exfiltrate sensitive local or generated data to external services and expands the trust boundary beyond the RunningHub platform.
The README explicitly advertises automatic uploads to Baidu Netdisk and Google Drive plus context-driven AUTO storage selection, but it does not clearly warn users that generated content or intermediate artifacts may be transmitted to third-party storage providers. In an agent skill context, this increases the risk of unintended data disclosure because users may assume outputs remain local or only on RunningHub unless informed otherwise.
The skill documents use of environment variables and outbound network access to external services, but it does not declare an explicit tool scope such as permissions or allowed-tools. This can weaken least-privilege enforcement and make the skill's runtime capabilities less transparent to users and orchestrators, increasing the chance of unintended credential or network use.
The skill encourages uploading generated content to Baidu Netdisk and Google Drive, but it does not provide a clear user-facing warning that prompts, images, videos, and related data may be transmitted to third-party cloud providers. This creates a privacy and data-handling risk, especially if users unknowingly send sensitive or regulated content off-platform.
This manifest contains user-facing natural-language fields such as the comment and descriptions entirely in Chinese, but it does not indicate that the skill is region-specific or offer any language choice. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.
Fields like input descriptions and app descriptions remain exclusively in Chinese across the rest of the file, with no indication of optional language support or justified locale restriction. This creates the same language-policy issue throughout the manifest.
The client reads ~/.openclaw/openclaw.json, which is broader local configuration unrelated to the minimum needed for a simple RunningHub API wrapper. This expands the skill's access to local user data and allows implicit ingestion of user-defined app mappings and other surrounding config, increasing privacy and trust-boundary risk if the file contains sensitive or unexpected content.
This function uploads arbitrary file content to a remote service, but there is no built-in disclosure, confirmation, or policy check around what data is being sent. In a skill context, that can lead to accidental exfiltration of local or user-supplied sensitive files if higher-level callers pass confidential material without clear user awareness.
The request target is built from this.baseUrl, which ultimately comes from an environment variable without validation. If an attacker can influence RUNNINGHUB_BASE_URL, uploaded file contents and the API key can be redirected to an arbitrary host, turning this into credential and data exfiltration rather than a mere dynamic endpoint choice.
const blob = new Blob([fileBuffer]);
formData.append('file', blob, 'upload');
const response = await fetch(`https://${this.baseUrl}/task/openapi/upload`, {
method: 'POST',
body: formData,
});
Task submission sends the API key and task payload to a remote endpoint without any explicit disclosure or host verification in this client. While remote submission is expected for an API client, the lack of transparency and safeguards makes accidental transmission of sensitive prompts, workflow data, or credentials to an unexpected endpoint more dangerous.
This fetch also uses an unvalidated dynamic baseUrl, allowing task payloads and the API key to be sent to attacker-controlled infrastructure if the environment variable is manipulated. In this skill, task payloads may include user prompts, workflow definitions, or references to uploaded assets, so the trust-boundary violation is meaningful.
await this.acquireSlot();
try {
const response = await fetch(`https://${this.baseUrl}/task/openapi/ai-app/run`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
The queryTask call posts the API key and task identifier to a host derived from untrusted configuration. Although this path may expose less raw content than uploads, it still leaks credentials and metadata and enables network requests to arbitrary destinations under attacker influence.
* 查询任务
*/
async queryTask(taskId) {
const response = await fetch(`https://${this.baseUrl}/task/openapi/outputs`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
The function fetches arbitrary remote content from a URL and writes it directly to local disk without validating source, size, content type, or destination policy. In a skill context, this can enable untrusted file persistence, disk exhaustion, or retrieval of attacker-controlled payloads that later get processed or opened by other components.
The manifest describes a skill for calling the RunningHub AI platform for image/video generation with storage decisions and workflows. In this file, the implementation executes local system commands (unzip, bdpan, gog) via child_process.execSync, introducing host-level command execution capabilities beyond straightforward API/result handling.
The code automatically extracts ZIP archives obtained from remote URLs using a shell-invoked unzip command, with no validation of archive contents, size, nesting, or path traversal behavior. This creates risk of zip bombs, resource exhaustion, and potentially unsafe file placement or downstream processing of attacker-supplied extracted files.
The manifest emphasizes direct RunningHub invocation and mentions storage judgment, but this implementation can transfer outputs into Baidu Netdisk or Google Drive. That adds separate third-party data export capability not clearly justified as an obvious implementation detail of calling the RunningHub platform itself.
This .mjs file uses Chinese-only natural-language documentation and CLI/runtime messages throughout, starting with the module header and continuing in user-visible outputs. The policy requires flagging language or locale constraints when the skill forces a specific language without user opt-in, and there is no indication here that users can choose another language.
The top-level description is in Chinese and the rest of the document also presents instructions in Chinese, but there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. This can violate language/locale policy when a specific language is effectively forced without opt-in or justification.
The natural-language comment uses Chinese exclusively ("默认配置"), which indicates a language-specific default without any accompanying user choice or explanation that the skill is region-specific. Under the policy, locale or language constraints should either be optional for the user or clearly justified.
This JSON manifest contains natural-language descriptions in Chinese (for example, "Qwen 文生图 - AIRix AIGC") without any indication that the skill is region-specific or that users can choose another language. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.
The description "ZImage 文生图" is Chinese-only natural-language content, and the file does not explain that this configuration is intentionally limited to a Chinese locale. This can violate the language/locale policy when no user opt-in or justification is provided.
The entry "FLUX2 文生图" continues the pattern of Chinese-only descriptions in a general configuration template with no visible user language choice. That creates a potential language-policy issue for users expecting locale neutrality.
The human-readable comments and descriptions in this file are written only in Chinese, indicating a fixed language choice without offering an alternative or documenting a justified locale constraint. This can violate language/locale policy when the skill does not explicitly provide user opt-in or note that it is intended only for a Chinese-language context.