Back to skill

Security audit

油管视频转音频到飞书

Security checks for vulnerabilities and agentic risk

Overview

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.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
index.js:65
Finding

Weak YouTube URL Validation Allows Requests to Unintended Network Targets

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
youtube_upload.py:63
Finding

Shared Temporary Directory and Arbitrary MP3 Selection Can Return Another Invocation's File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
youtube_upload.py:51
Finding

Missing Download Size Enforcement and Cleanup Permit Storage Exhaustion

Content
View full analysis
)", "2. Send to user: feishu_im_user_message (msg_type=file, content={'file_key': })", ] } print(json.dumps(output, indent=2, ensure_ascii=False)) ``` ### Technical Analysis The Skill documentation declares a maximum file size of 100 MB and automatic cleanup, but the dispatched implementation enforces neither control. The five-minute process timeout limits wall ...[truncated 1498 chars]
Remediation
View remediation
max_size: audio_file.unlink(missing_ok=True) return {"error": "Downloaded audio exceeds the 100 MB limit"} ``` ]]>

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded yt-dlp Dependency Produces Non-Reproducible and Unsafe Installations

Content
View full analysis
=2024.0.0 ``` The installation documentation also recommends an unpinned installation: ```bash pip install yt-dlp ``` ### Technical Analysis The requirement defines only a minimum version. Any future `yt-dlp` release satisfying the constraint can therefore be installed without project review. The resulting environment is not reproducible and can change when dependencies are resolved at different times. This finding does not establish that the current `yt-dlp` package is malicious. The risk arises because a future compromised, defective, or behaviorally incompatible release could be selected automatically. No package hashes are supplied to verify the exact artifact installed. Because `yt-dlp` is directly executed against attacker-supplied media URLs and writes files locally, compromise of that dependency would execute with the same filesystem and network privileges as the Skill. ### Attack Path 1. An administrator or automated installer processes `requirements.txt`. 2. The package resolver selects the newest available release satisfying `>=2024.0.0`. 3. A future compromised or otherwise unsafe release is downloaded because no upper bound, lock file, or hash prevents its selection. 4. The package is installed and later executed by the Skill. 5. Any malicious package behavior runs with the privileges of the installer or Skill process. This is a supply-chain exposure rather than evidence of a currently compromised dependency. ### Impact Assessment If the selected dependency release were compromised, it could access files, environment variables, and network resources available to the Python process. Installation hooks could also execute with the privileges used during package installation. The likelihood is lower than the directly exploitable coding flaws becaus ...[truncated 97 chars]
Remediation
View remediation
\ --hash=sha256: ``` The exact version and hash should be generated from a trusted package source and validated during the project's release process rather than copied without verification. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

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.

Content

Scanner excerpt · index.js (reported line 23)May include surrounding context.

js
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) {

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

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.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · youtube_to_feishu_complete.py (reported line 45)May include surrounding context.

python
]
    
    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 call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · youtube_upload.py (reported line 39)May include surrounding context.

python
]
    
    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 call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · youtube_to_feishu_complete.py (reported line 71)May include surrounding context.

python
]
    
    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 call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · youtube_upload.py (reported line 64)May include surrounding context.

python
]
    
    try:
        result = subprocess.run(download_cmd, capture_output=True, text=True, timeout=300)
        if result.returncode != 0:
            return {"error": f"Download failed: {result.stderr}"}

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

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.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
yt-dlp>=2024.0.0

Unverifiable Dependency: yt-dlp has 16 known advisory(ies) (CVE-2023-46121 (yt-dlp Generic Extractor MITM Vulnerability via Arbitrary Proxy Injection); GHSA-3v33-3wmw-3785 (yt-dlp has dependency on potentially malicious third-party code in Douyu extract); CVE-2023-40581 ( yt-dlp on Windows vulnerable to `--exec` command injection when using `%q`) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
73% confidence
Finding

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.

Content

No source excerpt is available for this finding.