Back to skill

Security audit

bilibili-yt-dlp

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Bilibili video-downloading guide with expected local downloads, optional authentication cookies, and common dependency-installation risks.

Install yt-dlp and ffmpeg from trusted sources, preferably in an isolated environment. Be cautious with --cookies-from-browser or --cookies because they can expose authenticated session data, and only download or share videos you are authorized to access.

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
SKILL.md:22
Finding
Unpinned Third-Party Package Installation## Vulnerability Details **File Location**: `SKILL.md`, line 22 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash pip3 install yt-dlp ``` ### Technical Analysis The installation command does not pin `yt-dlp` to a reviewed version or verify its integrity with a cryptographic hash. Consequently, the installed code may differ over time from the version considered during this audit. Because Python package installation can invoke package-controlled build or installation logic, compromise of the package, one of its dependencies, the configured package index, or a future release could result in arbitrary local code execution. This finding concerns mutable supply-chain trust; the audit found no evidence that `yt-dlp` itself is currently malicious. ### Attack Path 1. An attacker compromises a future `yt-dlp` release, a transitive dependency, or the package index used by the victim. 2. A user follows the prerequisite and executes `pip3 install yt-dlp`. 3. `pip` resolves and downloads the attacker-controlled package content because no reviewed version or hash is required. 4. Malicious build, installation, or runtime code executes in the user's environment. 5. The payload obtains the permissions of the account running the command and can access resources available to that account. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the installing or invoking user. Depending on that user's permissions, the attacker could read or modify accessible files, steal browser cookies or other credentials available to the process, alter downloaded media, or establish additional malicious behavior. The direct scope is the host and user environment where the dependency is installed; this instruction does not itself request elevated privileges.
Remediation
## Remediation Suggestions - Pin `yt-dlp` to a specifically reviewed version rather than installing the latest available release. - Maintain the dependency in a locked requirements file and verify it using trusted hashes, for example: ```text yt-dlp==REVIEWED_VERSION --hash=sha256:VERIFIED_DISTRIBUTION_HASH ``` Install it with: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` - Obtain the verified hash from an approved artifact repository or independently validated release artifact. - Use an organization-controlled package mirror where possible and restrict fallback to untrusted indexes. - Periodically review and deliberately update the pinned version after checking release provenance and security advisories. - Install the package in an isolated virtual environment under a non-privileged account.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill instructs the agent to send downloaded video files to the user and then delete them, but it provides no user-facing notice about temporary file creation, retention, or handling of potentially copyrighted or sensitive media. This creates a data-handling and transparency gap: users may not realize files are stored locally, transmitted, and then removed, which can lead to privacy, auditability, or policy compliance issues.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
整个技能文件均以中文编写,未说明这是区域限定技能,也未提供其他语言选项或用户可选的语言偏好。若组织要求不强制特定语言而需尊重用户语言选择,这种单一语言约束可能构成自然语言策略违规。

Static analysis

No suspicious patterns detected.