T08 · Insecure Dependencies
- Location
scripts/videogen.py:8- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/videogen.py:8-12
Related Documentation:SKILL.md:67
Vulnerability Type: Unconstrained third-party package installation
Risk Level: LowEvidence
python try: import requests except ImportError: print("缺少依赖:requests。请运行 pip3 install requests", file=sys.stderr) sys.exit(1)The documentation also declares that the script requires
requests, but the project contains no pinned requirements file, lockfile, package hash, or package-index restriction.Technical Analysis
When
requestsis unavailable, the script instructs the user to install it using an unconstrainedpip3 install requestscommand. This resolves the package and its transitive dependencies from the user's configured Python package index at installation time.Although
requestsis a well-established package and no malicious dependency is included directly in this repository, the installation is not reproducible. The effective dependency versions may change after the Skill has been audited. Security therefore depends on the current state of the package index, resolver configuration, and every transitive dependency selected at installation time.This is a supply-chain hardening issue rather than evidence that the project intentionally retrieves a malicious package.
Attack Path
- A user invokes
scripts/videogen.pyin an environment whererequestsis not installed. - The script recommends running
pip3 install requests. - The user executes that command without version or hash constraints.
pipresolves mutable package and transitive-dependency versions from the configured index or mirror.- If that source, a selected release, or a transitive dependency has been compromised, package installation code can execute with the privileges of the user running
pip. - The compromised dependency can subsequently execute whenever
videogen.pyimport ...[truncated 618 chars]
- A user invokes
- Remediation
View remediation
Remediation Suggestions
- Add a reviewed requirements file with exact dependency and transitive-dependency versions.
- Generate and verify cryptographic hashes for every package, then install with:
bash python3 -m pip install --require-hashes -r requirements.txt - Use a lockfile generated by a dependency-management tool such as
pip-tools, Poetry, or uv. - Configure installations to use an approved package index or internal mirror.
- Run dependency vulnerability scanning in continuous integration and update pinned versions through a controlled review process.
- Replace the unconstrained installation instruction with a reference to the locked dependency installation procedure.
- Prefer installation inside an isolated virtual environment rather than the system Python environment.
