T08 · Insecure Dependencies
- Location
scripts/setup_avatar.py:2- Finding
Unpinned Runtime Dependencies Create a Supply-Chain Risk
- Content
View full analysis
=3.10" # dependencies = [ # "runwayml>=4.0.0", # "httpx>=0.27.0", # ] # /// ``` ### Technical Analysis The scripts are intended to be launched through `uv run`, which resolves the inline dependency declarations at runtime. The dependencies specify only minimum versions and do not provide exact versions, a committed lockfile, or package integrity hashes. Consequently, a future release of `runwayml` or `httpx` can be installed and executed without that release having been reviewed as part of this Skill. Python package installation and import execute package-controlled code with the privileges of the user invoking the Skill. This is particularly sensitive because the dependency code executes in a process that has access to: - The `RUNWAY_API_SECRET` environment variable or an API key supplied through `--api-key`. - User-provided speech text and avatar descriptions. - Avatar image URLs and generated media URLs. - The current user's filesystem permissions. - Network access available to the Skill process. There is no evidence that the currently declared package names are malicious. The vulnerability is the lack of reproducible, integrity-controlled dependency resolution. ### Attack Path 1. An attacker compromises the publisher account, distribution infrastructure, or a future permitted release of one of the dependencies. 2. The attacker publishes a malicious version satisfying `runwayml>=4.0.0` or `httpx>=0.27.0`. 3. A user invokes one of the documented `uv run` commands in an environment that resolves the malicious release. 4. `uv` downloads and installs the permitted version. 5. The script imports the dependency: ...[truncated 954 chars]- Remediation
View remediation
", # "httpx==", # ] ``` 2. Generate and commit a `uv.lock` file so dependency resolution, including transitive dependencies, is reproducible. 3. Run documented commands in locked or frozen mode so execution fails rather than silently selecting newer versions. 4. Use package hashes or an integrity-verifying internal package mirror where supported. 5. Introduce an explicit dependency-update process that includes: - Source and release review. - Vulnerability scanning. - Automated tests. - Lockfile review. 6. Avoid exposing secrets to dependency installation or build hooks where the execution environment permits installation to be separated from runtime. 7. Apply the same controls to both `scripts/setup_avatar.py` and `scripts/generate_video.py`. ]]>
