Back to skill

Security audit

小米触屏闹钟视频制作

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Bilibili video download and media-processing guide, with install and overwrite cautions users should handle carefully.

Install dependencies in a dedicated virtual environment, avoid `--break-system-packages`, and choose output filenames/directories carefully because ffmpeg commands use overwrite mode and repeated runs for the same BV ID can replace prior outputs.

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:10
Finding
Unpinned Third-Party Packages Installed Outside an Isolated Environment## Vulnerability Details **File Location**: `SKILL.md`, lines 10–11, 32, and 201 **Vulnerability Type**: Supply-chain exposure through mutable dependencies and unsafe system-environment installation **Risk Level**: Medium ### Vulnerable Code Lines 10–11: ```markdown - yt-dlp: `py -m pip install yt-dlp` - bilix (备用): `pip install bilix --break-system-packages` ``` Line 32: ```bash pip install bilix --break-system-packages ``` Line 201: ```bash # 1. 安装 bilix pip install bilix --break-system-packages ``` ### Technical Analysis The instructions install `yt-dlp` and `bilix` from the configured Python package index without pinning reviewed versions or verifying package hashes. Consequently, the effective package and transitive dependency contents can change after the Skill has been audited. The `--break-system-packages` option additionally bypasses the protection for externally managed Python environments. This can install or replace packages in an interpreter managed by the operating system, increasing the potential for dependency conflicts and damage to other applications using that interpreter. A malicious or compromised package release, compromised transitive dependency, package-index account takeover, or untrusted configured package index could introduce attacker-controlled code. Depending on the package format and installation process, such code could run during package building or later when the installed package is invoked. ### Attack Path 1. An agent or user follows the dependency instructions in `SKILL.md`. 2. `pip` resolves the latest available package versions and their transitive dependencies from the configured package index. 3. A compromised release, malicious dependency, or untrusted index supplies attacker-controlled package content. 4. The content is installed without version or cryptographic hash verification. 5. Attacker-controlled code executes during a source-package build or wh ...[truncated 835 chars]
Remediation
## Remediation Suggestions 1. Create and activate a dedicated virtual environment before installing dependencies: ```bash python -m venv .venv . .venv/bin/activate python -m pip install --upgrade pip ``` 2. Remove `--break-system-packages` from every installation command. 3. Pin reviewed versions of all direct and transitive dependencies in a lock file. 4. Generate and verify cryptographic hashes, then install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 5. Configure an explicitly trusted package index and disable unexpected additional indexes to reduce dependency-confusion exposure. 6. Review package provenance and release integrity before updating pinned versions. 7. Run downloading and media-processing tools as a non-privileged user with access limited to the required input and output directories. 8. Add the referenced processing script and locked dependency manifest to the reviewed project rather than directing users to locate unofficial replacement files.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill’s default workflow performs destructive media transformations by design: it crops, trims, compresses, and uses ffmpeg with `-y`, which overwrites existing files without prompting. Although this is not arbitrary code execution, the omission of a clear warning can cause users to unintentionally alter or replace media files, especially if output paths collide or users assume the process is non-destructive.

Static analysis

No suspicious patterns detected.