Back to skill

Security audit

Youtube Transcript Local

Security checks for vulnerabilities and agentic risk

Overview

This skill appears intended to extract YouTube transcripts, but it under-discloses network and dependency-install behavior while making overly broad safety claims.

Review before installing. Use this only in a constrained environment where YouTube access is acceptable, preinstall and pin yt-dlp through a trusted process, and avoid letting the skill auto-install packages during normal use. Treat the local/no-risk claims as incomplete rather than as a security guarantee.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
extract.py:52
Finding

Automatic Runtime Installation of an Unpinned Third-Party Dependency

Content
View full analysis
=2026.1.1 ``` ### Technical Analysis When `yt-dlp` cannot be found locally, constructing a `YouTubeTranscriptExtractor` automatically invokes pip to download and install the package. The installation command does not specify an exact version, package hash, trusted package index, isolated environment, or user confirmation. This means the effective code executed by the skill is not fully represented by the audited project. Package resolution can select a future release, and installation behavior can be influenced by the active pip configuration and configured package indexes. A compromised permitted release, package repository, mirror, or dependency could therefore introduce attacker-controlled code after this project has been reviewed. Python package installation may execute build backend or installation-related code. In addition, the installed `yt-dlp` executable is subsequently launched by the application to retrieve video information and subtitles. Consequently, compromise can occur either during package installation or when the newly installed executable is invoked. ### Attack Path 1. The attacker compromises a package source, configured mirror, permitted future `yt-dlp` release, or transitive dependency involved in resolution. 2. A user runs the skill in an environment where `yt-dlp` is not already installed. 3. `YouTubeTranscriptExtractor.__init__()` calls `_find_yt_dlp()`. 4. `_find_yt_dlp()` executes `python -m pip install yt-dlp` ...[truncated 1156 chars]
Remediation
View remediation
=`, for example: ```text yt-dlp== ``` 3. Generate and verify cryptographic hashes for all distributable artifacts and transitive dependencies. Install with a locked requirements file and: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Use a dedicated virtual environment or container with least-privilege filesystem and network permissions. 5. Configure an explicitly trusted package index or internally controlled package mirror rather than inheriting arbitrary user or system pip configuration. 6. Separate dependency provisioning from normal skill execution so installation occurs during a controlled build or deployment stage. 7. Add automated dependency scanning and a controlled update process. Review and regenerate the lock file and hashes whenever the dependency version changes. 8. After locating `yt-dlp`, validate that the resolved executable belongs to the expected managed environment before invoking it. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (15)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 39)May include surrounding context.

md
3. **可選:ffmpeg**(用於音頻處理)
   - Windows: `choco install ffmpeg` 或從 https://ffmpeg.org/download.html 下載
   - macOS: `brew install ffmpeg`
   - Linux: `sudo apt install ffmpeg`

### 安裝技能

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README shows a very broad natural-language activation example ('幫我總結這個 YouTube 視頻') with no explicit scoping, confirmation, or invocation constraints. In an agent environment, overly generic trigger phrasing can cause accidental or unintended skill invocation on user-supplied URLs, increasing the chance of misuse, prompt-routing mistakes, or processing untrusted content without clear user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The environment-variable and config examples set Chinese defaults such as 'YT_DEFAULT_LANG=zh-Hans', 'lang: zh-Hans', and 'whisper.language: zh'. This establishes a specific language/locale preference by default, and the README does not frame it as an opt-in choice or region-specific requirement.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill claims there is 'no security risk' and emphasizes safety markers like 'no VirusTotal flag' even though it explicitly requires network access to YouTube and execution of external binaries such as yt-dlp, ffmpeg, Whisper, or OCR tooling. This can mislead users and downstream agents into treating the skill as safer than it is, reducing scrutiny around network transmission, dependency trust, and command execution risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description promotes local execution but omits a clear upfront warning that the workflow makes outbound requests to YouTube and transmits requested video URLs and related metadata. Users may incorrectly infer that 'local' means offline or private, which creates a transparency and consent problem around data exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The example trigger phrases are broad everyday requests like summarizing a YouTube video or asking what a video is about, which can cause the skill to activate unexpectedly in normal conversations. Overbroad activation increases the chance of unintended network access and external tool invocation without the user clearly understanding that those actions will occur.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Labeling the tool as a 'Local Safe Version' is misleading because the implementation performs network-backed operations and can install software at runtime. Misrepresenting trust boundaries can cause operators to run the skill in sensitive environments under false assumptions, increasing the chance of unsafe deployment decisions.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

The code automatically installs and executes a package from PyPI at runtime when yt-dlp is missing. This creates a software supply chain risk because package retrieval depends on network access and trust in the package index, and it also violates the expectation of a purely local/safe tool by performing implicit code acquisition and execution.

Content

Scanner excerpt · extract.py (reported line 55)May include surrounding context.

python
return str(path)
        
        print("Installing yt-dlp...")
        subprocess.check_call([sys.executable, "-m", "pip", "install", "yt-dlp"])
        return shutil.which("yt-dlp")
    
    def extract(self, url, lang="en", auto_generate=True):

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 · extract.py (reported line 114)May include surrounding context.

python
def _get_video_info(self, url):
        """獲取視頻信息"""
        cmd = [self.yt_dlp_path, "--dump-json", "--no-download", url]
        result = subprocess.run(cmd, capture_output=True, text=True, encoding='utf-8')
        if result.returncode != 0:
            raise Exception(f"yt-dlp error: {result.stderr}")
        return json.loads(result.stdout)

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 · extract.py (reported line 136)May include surrounding context.

python
def _get_video_info(self, url):
        """獲取視頻信息"""
        cmd = [self.yt_dlp_path, "--dump-json", "--no-download", url]
        result = subprocess.run(cmd, capture_output=True, text=True, encoding='utf-8')
        if result.returncode != 0:
            raise Exception(f"yt-dlp error: {result.stderr}")
        return json.loads(result.stdout)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The command-line interface sets the default subtitle language to 'zh-Hans', which imposes a specific locale choice when the user does not explicitly select one. This is a natural-language policy concern because the file does not document a justified region-specific constraint or require user opt-in before applying that locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file's instructions and operational guidance are overwhelmingly in Chinese, which can impose a language constraint on users without explicit opt-in. Under the policy rule, forcing a specific language without offering choice or documenting a justified regional scope is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The skill documentation and examples consistently assume Chinese-language interaction and outputs, including generating a Chinese summary in one workflow, without stating that the user can choose the response language. This can create an implicit language policy constraint without user opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with a lower-bound range (yt-dlp>=2026.1.1) rather than an exact pinned version, which makes builds non-reproducible and can unintentionally pull in newer releases with breaking changes or newly introduced security issues. In a security-sensitive skill, this weakens supply-chain control and makes it harder to verify exactly which code will be installed.

Content

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

text
# Core dependencies
yt-dlp>=2026.1.1

# Optional: Audio processing
# ffmpeg-python>=0.2.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
89% confidence
Finding

The manifest references yt-dlp without pinning to a specific vetted release, while the package family has multiple known advisories. Because the exact installed version is not fixed, it is impossible to determine from this file whether deployment will select a patched or vulnerable build, creating avoidable supply-chain uncertainty; in a tool that downloads and processes untrusted remote media, that uncertainty is more concerning than in a purely local library.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.