T08 · Insecure Dependencies
- Location
scripts/overlay.py:3- Finding
Unpinned Runtime Dependencies Allow Mutable Supply-Chain Code Execution
- Content
View full analysis
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: MediumVulnerable 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_talkTechnical Analysis
The script declares mutable dependency ranges for
moviepyandpillow, whilenumpyhas no version constraint. The documenteduv run --withworkflow 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
- An attacker compromises an upstream dependency release or its package-publishing account.
- The attacker publishes a malicious version satisfying the declared constraints, such as a later
moviepyorpillowrelease, or any selectednumpyversion. - A user follows the documented
uv run --with moviepy --with pillowexecution workflow in an environment without a previously verified, immutable resolution. uvresolves and installs the attacker-controlled package version.- Malicious package code executes during installation or Python import.
- The payload runs with the privileges and ...[truncated 898 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace broad dependency ranges with exact, reviewed versions for every direct dependency, including
numpy. - Generate and commit a
uvlockfile containing the complete transitive dependency graph. - Require execution in locked or frozen mode so dependency resolution fails rather than silently selecting newer versions.
- Use hash verification for downloaded distributions where supported.
- Restrict package resolution to an explicitly configured, trusted registry and disable unintended supplemental indexes to reduce dependency-confusion exposure.
- Update the documented commands so they use the project's locked environment instead of unconstrained
--with moviepy --with pillowresolution. - Perform dependency updates through a controlled review process that includes vulnerability scanning, provenance checks, and testing before regenerating the lockfile.
- 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.
- Replace broad dependency ranges with exact, reviewed versions for every direct dependency, including
