T09 · Insecure Skill Coding Practices
- Location
index.js:65- Finding
Weak YouTube URL Validation Allows Requests to Unintended Network Targets
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent YouTube-to-Feishu goal, but the bundled code does not actually complete the promised upload flow and handles URLs, environment variables, and temporary audio files too broadly.
Review this before installing as a working uploader. In its current form it should be treated as a local YouTube audio downloader that may leave MP3 files on disk, not as a reliable Feishu upload-and-cleanup automation. It should be fixed to parse and allowlist YouTube URLs, use per-run temporary directories, delete files deterministically, enforce size limits, pass only required environment variables, pin dependencies, and report Feishu upload/send status only after those actions actually succeed.
index.js:65Weak YouTube URL Validation Allows Requests to Unintended Network Targets
youtube_upload.py:63Shared Temporary Directory and Arbitrary MP3 Selection Can Return Another Invocation's File
youtube_upload.py:51Missing Download Size Enforcement and Cleanup Permit Storage Exhaustion
requirements.txt:1Unbounded yt-dlp Dependency Produces Non-Reproducible and Unsafe Installations
The skill claims to upload files to Feishu, but the finding indicates it only stores files locally and emits next-step instructions rather than actually invoking Feishu upload tools. While this is not an exploit primitive by itself, it is a trust and transparency problem that can cause users to believe data was transferred or cleaned up when it was not, leaving local artifacts behind.
The skill claims to upload files to Feishu, but the finding indicates it only stores files locally and emits next-step instructions rather than actually invoking Feishu upload tools. While this is not an exploit primitive by itself, it is a trust and transparency problem that can cause users to believe data was transferred or cleaned up when it was not, leaving local artifacts behind.
Merging process.env and config?.env into the subprocess environment gives the Python script access to all ambient credentials available to the Node process. If the Python script, its dependencies, or any invoked network-facing tooling are compromised or overly verbose, those credentials could be exfiltrated or misused, making this a real credential exposure risk.
return new Promise((resolve) => {
const child = execFile(PYTHON, [SCRIPT_PATH, ...args], {
maxBuffer: 50 * 1024 * 1024,
env: { ...process.env, ...config?.env },
cwd: TEMP_DIR,
}, (error, stdout, stderr) => {
if (error) {
The publishing guide promotes a workflow that downloads content from YouTube and uploads it to Feishu, but it does not clearly instruct publishers to present strong user-facing warnings about external data transfer, third-party processing, privacy implications, or account/permission scope. In a skill marketplace context, this omission can cause users to trigger transfers of potentially sensitive or copyrighted content to external services without informed consent or understanding of downstream effects.
This markdown file documents behavior that affects user data and system integrity: it downloads remote content, uploads files to a third-party cloud service, sends messages on the user's behalf, and deletes temporary files. While the features are described, there is no clear cautionary warning about external data transfer, required trust in the destination account, or local file cleanup effects.
The skill advertises command/tool behavior that relies on shell execution and environment variables, but it does not declare any explicit tool scope such as allowed-tools or permissions. This weakens security review and policy enforcement because the runtime capabilities are broader than what the manifest makes explicit, increasing the chance of unintended command execution or access to sensitive environment data.
The skill spawns a Python subprocess and forwards the full parent environment plus config-provided environment variables into it. This can expose secrets such as API tokens, cloud credentials, or session data to the child process and to any libraries it invokes, which is risky because the subprocess handles untrusted user-supplied URLs and its behavior is not disclosed or constrained here.
The script advertises a complete workflow including Feishu upload and message delivery, but those actions are only placeholders and never actually occur. This is dangerous because users may believe media was transferred to Feishu and handled there, while it remains stored locally, creating security, privacy, and operational mismatches.
The cleanup routine intentionally retains the just-downloaded audio file and only deletes older files later, without clearly warning the user that media persists locally. In this skill context, downloaded audio may contain private or copyrighted material, so silent retention on shared hosts or multi-user systems can expose data to unintended parties.
The final output claims the file was uploaded and sent even though the send step is commented out and upload_to_feishu only returns a placeholder status. False success reporting can cause users or downstream agents to stop verifying delivery, leaving sensitive files on disk and leading to data handling errors or accidental exposure.
The skill sends the user-provided URL to yt-dlp, which causes network communication with YouTube and possibly related hosts, but this is not clearly disclosed in the user-facing behavior. While expected for a YouTube downloader, lack of explicit disclosure can still create privacy and consent issues around third-party contact and metadata exposure.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
]
try:
result = subprocess.run(info_cmd, capture_output=True, text=True, timeout=60)
if result.returncode != 0:
return {"error": f"Failed to get video info: {result.stderr}"}
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
]
try:
result = subprocess.run(info_cmd, capture_output=True, text=True, timeout=60)
if result.returncode != 0:
return {"error": f"Failed to get video info: {result.stderr}"}
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
]
try:
result = subprocess.run(download_cmd, capture_output=True, text=True, timeout=300)
if result.returncode != 0:
return {"error": f"Download failed: {result.stderr}"}
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
]
try:
result = subprocess.run(download_cmd, capture_output=True, text=True, timeout=300)
if result.returncode != 0:
return {"error": f"Download failed: {result.stderr}"}
The skill metadata claims it uploads to Feishu cloud storage, but the code only downloads media locally and prints manual follow-up instructions. This mismatch can mislead operators about what actions are automated, what data remains on disk, and whether additional human or agent steps will transmit files elsewhere.
The skill saves downloaded audio into a persistent temp directory under the project tree without clearly disclosing local file creation, retention, or cleanup behavior. This can expose potentially sensitive media artifacts to other users, later processes, or accidental reuse if the environment is shared.
The dependency is specified as yt-dlp>=2024.0.0, which allows installation of any newer version and makes builds non-reproducible. This increases supply-chain risk because a future compromised or incompatible release could be pulled in without review, and it also prevents verifying whether known advisories affect the resolved version.
yt-dlp>=2024.0.0
The manifest uses yt-dlp without pinning to a specific release, while the package has multiple published advisories. In a skill that downloads media from untrusted remote sites, use of a vulnerable yt-dlp version could be more dangerous because parsing attacker-controlled metadata or invoking extractor logic may expose the host to command injection, unsafe network behavior, or malicious third-party code paths depending on the installed version and platform.
The script invokes yt-dlp with the provided YouTube URL, which results in network requests to external services to retrieve metadata and download content. While the action is functionally expected, the user-facing documentation and prompts do not explicitly disclose that the supplied URL and related request data will be transmitted over the network.