T08 · Insecure Dependencies
Warning
- Location
- scripts/overlay.py:3
- Finding
- Unpinned Runtime Dependencies Allow Mutable Supply-Chain Code Execution## Vulnerability Details **File Location**: `scripts/overlay.py:3-5` **Additional Location**: `SKILL.md:17`, `SKILL.md:49` **Vulnerability Type**: Unpinned third-party runtime dependencies **Risk Level**: Medium ### Vulnerable Code ```python # /// script # requires-python = ">=3.10" # dependencies = ["moviepy>=2.0", "pillow>=10.0", "numpy"] # /// ``` The documented execution commands also resolve dependencies dynamically: ```bash uv run --with moviepy --with pillow scripts/overlay.py \ --video base.mp4 \ --output final.mp4 \ --product rain_cloud \ --style subtitle_talk ``` ### Technical Analysis The script declares mutable dependency ranges for `moviepy` and `pillow`, while `numpy` has no version constraint. The documented `uv run --with` workflow can resolve and install packages at execution time. The project does not include a reviewed lockfile, exact package versions, or package hashes. Consequently, the code executed by the Skill can change even when the audited project files remain unchanged. If an allowed future dependency release or its distribution account is compromised, malicious package initialization code may execute when the dependency is installed or imported. Broad constraints can also introduce incompatible releases, although compatibility failures alone are a reliability concern rather than a security vulnerability. ### Attack Path 1. An attacker compromises an upstream dependency release or its package-publishing account. 2. The attacker publishes a malicious version satisfying the declared constraints, such as a later `moviepy` or `pillow` release, or any selected `numpy` version. 3. A user follows the documented `uv run --with moviepy --with pillow` execution workflow in an environment without a previously verified, immutable resolution. 4. `uv` resolves and installs the attacker-controlled package version. 5. Malicious package code executes during installation or Python import. 6. The payload runs with the privileges and ...[truncated 898 chars]
- Remediation
- ## Remediation Suggestions 1. Replace broad dependency ranges with exact, reviewed versions for every direct dependency, including `numpy`. 2. Generate and commit a `uv` lockfile containing the complete transitive dependency graph. 3. Require execution in locked or frozen mode so dependency resolution fails rather than silently selecting newer versions. 4. Use hash verification for downloaded distributions where supported. 5. Restrict package resolution to an explicitly configured, trusted registry and disable unintended supplemental indexes to reduce dependency-confusion exposure. 6. Update the documented commands so they use the project's locked environment instead of unconstrained `--with moviepy --with pillow` resolution. 7. Perform dependency updates through a controlled review process that includes vulnerability scanning, provenance checks, and testing before regenerating the lockfile. 8. Run video processing in a sandbox or container with minimal filesystem access, no unnecessary credentials, and restricted network access to reduce the impact of a compromised dependency.
