T08 · Insecure Dependencies
- Location
scripts/bootstrap_venv.py:21- Finding
Unpinned Third-Party Dependencies Allow Supply-Chain Drift
- Content
View full analysis
Vulnerability Details
File Location:
scripts/bootstrap_venv.py, lines 21–22
Vulnerability Type: Unpinned network-fetched dependencies
Risk Level: MediumVulnerable Code
python run([py, "-m", "pip", "install", "--upgrade", "pip"]) run([py, "-m", "pip", "install", "skyfield", "pytz"])Technical Analysis
The bootstrap process upgrades
pipand installsskyfieldandpytzfrom the configured Python package index without exact version constraints, integrity hashes, or a reviewed lock file. Consequently, the code installed and executed can change after this Skill has been audited.Python packages may execute code during installation and are subsequently imported by
scripts/events.py. If the package repository, configured package-index source, maintainer account, or a future dependency release is compromised, the bootstrap process can install attacker-controlled code. This is a supply-chain weakness rather than evidence that the currently named packages are malicious.The subprocess invocation itself uses an argument array without
shell=True; no shell-command injection was identified in this code.Attack Path
- An attacker compromises a dependency release, its publisher account, the configured package index, or another component in the transitive dependency chain.
- The attacker publishes a malicious version that still satisfies the unconstrained installation request.
- A user follows the setup instructions and runs
scripts/bootstrap_venv.py. - The bootstrap script downloads and installs the mutable package version into
.venv. - Malicious installation logic executes immediately, or malicious runtime logic executes when
scripts/events.pyimports the installed package. - The payload runs with the permissions and environment access of the user who invoked the bootstrap or Skill.
Impact Assessment
Successful exploitation could execute arbitrary Python code with the invoking user's privileges. Depending ...[truncated 496 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin exact versions of
pip,skyfield,pytz, and all transitive dependencies in a reviewed lock file. - Record cryptographic hashes for every distribution and install with
pip install --require-hashes -r requirements.txt. - Avoid an unconditional
pip --upgradeoperation. If a specific pip version is required, pin and hash that version as well. - Generate dependency locks in a controlled environment and review changes before updating them.
- Use a trusted, explicitly configured package index and restrict unexpected alternate or extra indexes.
- Add automated dependency vulnerability and provenance checks to the release process.
- Consider distributing or caching reviewed wheels from a controlled repository so installation does not resolve mutable dependency versions at runtime.
- Pin exact versions of
