T09 · Insecure Skill Coding Practices
- Location
scripts/seedance-gen.sh:209- Finding
Arbitrary JavaScript Execution Through Unsafely Interpolated Media URLs
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its media-generation purpose, but bundled scripts create review-level risk through a legacy URL injection flaw and an unrestricted authenticated HTTP helper.
Review before installing. Prefer the Node implementation and avoid running scripts/seedance-gen.sh with untrusted video or audio URLs until the interpolation bug is fixed. The maintainer should restrict scripts/http-request.js to HTTPS Volcengine Ark hosts before attaching DOUBAO_API_KEY. Treat prompts and media URLs as data sent to Volcengine, use a scoped API key, and remember generated files are saved locally by default.
scripts/seedance-gen.sh:209Arbitrary JavaScript Execution Through Unsafely Interpolated Media URLs
scripts/http-request.js:7API Key Disclosure Through an Arbitrary-Destination HTTP Helper
The declared description presents the skill as a media generation capability. However, the supplied code chunk does not perform any video/image generation or call Volcengine/Seedance APIs. Its primary purpose is installation and environment setup: filesystem writes, dependency detection, OpenClaw skills directory discovery, and API key configuration persistence. These are materially different from the declared runtime functionality, so this code chunk is not accurately represented by the description.
The README describes prompts, images, and videos being processed via the Volcengine Ark API but does not clearly warn users that their inputs will be transmitted to a third-party service. In a skill designed for agent-driven media generation, users may provide sensitive prompts or private media, so missing disclosure creates a meaningful privacy and data-handling risk.
The README instructs users to send prompts, images, and videos to a third-party cloud generation service using an API key, but it does not clearly disclose that user-supplied content will be transmitted off-device to Volcengine/Ark. In an agent skill context, users may provide sensitive prompts or media assuming local processing, so the lack of an explicit data-sharing warning creates a meaningful privacy and compliance risk.
The README instructs users to configure an API key and use cloud-based media generation, but it does not clearly disclose that prompts, images, and videos may be transmitted to a third-party service and that generated outputs are stored locally on disk. In a skill that handles user-supplied media and potentially sensitive prompts, this omission can lead to unintended data exposure, privacy issues, and unsafe handling of confidential content.
The skill declares capabilities that require environment access and shell execution, but it does not explicitly scope or constrain those permissions. That increases the attack surface because consumers and hosting agents cannot clearly enforce least privilege, and future script behavior may gain broad execution access without transparent review.
The skill clearly sends user prompts and user-provided image/video/audio URLs to Volcengine Ark APIs, but it does not prominently disclose that user content is transmitted to a third-party service for processing. This can create privacy, confidentiality, and compliance risk if users submit sensitive prompts or private media under the assumption processing is local.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
console.log(' node bin/cli.js --version ' + dim('# show version'));
console.log('');
console.log(bold('Options:'));
console.log(' -y, --yes ' + dim('Non-interactive mode. Auto-detect skills dir, skip prompts.'));
console.log(' --path <dir> ' + dim('Install to a specific directory (used with -y).'));
console.log('');
console.log(bold('What this installer does:'));
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
}
}
// Silent mode: create default path without asking
if (opts.silent) {
const defaultDir = path.join(home, '.openclaw', 'skills');
console.log(yellow(' ⚠ No skills directory found, creating: ') + defaultDir);
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
}
}
// Silent mode: create default path without asking
if (opts.silent) {
const defaultDir = path.join(home, '.openclaw', 'skills');
console.log(yellow(' ⚠ No skills directory found, creating: ') + defaultDir);
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
required: true,
installHint: {
darwin: 'brew install curl (or: xcode-select --install)',
linux: 'sudo apt install curl (or: sudo yum install curl)',
win32: 'Download from https://curl.se/windows/',
},
},
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
required: true,
installHint: {
darwin: 'brew install curl (or: xcode-select --install)',
linux: 'sudo apt install curl (or: sudo yum install curl)',
win32: 'Download from https://curl.se/windows/',
},
},
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
console.log('');
console.log(bold('Next steps:'));
console.log(' 1. ' + dim('Ensure DOUBAO_API_KEY is set in your environment'));
console.log(' ' + dim('export DOUBAO_API_KEY=your_key (or add to .zshrc/.bashrc)'));
console.log(' 2. ' + dim('Load the skill in your agent and start generating videos'));
console.log(' ' + dim('"Generate a 5-second 720p video of a sunset over the ocean"'));
console.log('');
The documentation tells users they can provide external image/video/audio URLs as reference media, but it does not warn that those URLs and referenced content will be transmitted to a third-party service provider for processing. In a media-generation skill, users may mistakenly submit private or sensitive assets, creating privacy, confidentiality, and compliance risks rather than direct code-execution risk.
This utility accepts an arbitrary URL from the command line and automatically attaches the DOUBAO_API_KEY as a Bearer token to every request. In the context of a video/image generation skill, that creates a confused-deputy capability: a caller can direct authenticated requests to unintended endpoints, potentially exfiltrating the API key to attacker-controlled services or using the tool for actions outside the skill’s stated purpose.
The script can send arbitrary payloads to user-supplied destinations while silently including an API credential from the environment, with no confirmation or visibility guardrails. In an agent skill, this increases the risk of unintended data transfer and secret exposure because the helper normalizes outbound authenticated requests without constraining what data is sent or where it goes.
The script reads the sensitive environment variable DOUBAO_API_KEY to authenticate API requests, but the file provides no warning about credential usage beyond requiring it to be set. Under the code-file criteria, sensitive credential access should have some user disclosure such as a comment, docstring, or explicit warning about how the key will be used.
The script submits generation payloads to external endpoints using http-request.js, including PROMPT text and potentially image, video, or audio URLs. Although network transmission is core functionality here, the file itself does not clearly disclose that user-supplied content is sent to a third-party service, which is a privacy-relevant behavior.
The README states that generated media is saved under ~/Videos/next-video-gen/ but does not clearly warn that outputs will be written to persistent local storage. This can expose sensitive generated content to other local users, backups, sync tools, or forensic recovery if users assume generation is ephemeral.
The document is entirely written in Traditional Chinese and labels itself as the Traditional Chinese variant. While alternate language files are linked, this file itself does not state any user-selectable locale behavior or justify a locale restriction, which can be read as a fixed-language experience in the skill documentation.
The file presents all user-facing instructions and API guidance exclusively in Chinese, with no indication that the skill is intentionally China/Chinese-locale-specific or that alternative language support is available. Under the stated policy, forcing a single language without user opt-in can be a natural-language policy violation.
The usage/comment says the tool handles -d '{"json"}', implying the next argument is direct JSON input. In reality, the code first attempts to read process.argv[5] as a filesystem path and only falls back to inline JSON on failure, so the documented behavior contradicts the primary operation actually performed.
This code emits a Chinese-only mode label (文生图) in its user-facing output. The file does not offer a language selection mechanism or explain that the skill is intentionally region-specific, so it creates a natural-language locale policy concern.
The modeInfo labels and submission status output use hard-coded Chinese strings for multiple modes. Because the skill provides no language preference setting or justification for a Chinese-only experience, this is a natural-language policy violation.
The progress log 视频生成中... (已等待 ... 秒) is user-facing and fixed to Chinese. Without user opt-in or documentation of a required locale, this violates the language/locale policy requirement.
The script creates an output directory and automatically downloads generated media into local files, but there is no upfront disclosure that running the skill will write files under $HOME/Videos/next-video-gen by default. For code files, file writes should have some user-facing warning, log, or explanatory comment.