T08 · Insecure Dependencies
- Location
SKILL.md:34- Finding
Unpinned Third-Party Dependencies Create Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:34,SKILL.md:45-49,references/getting-started.md:14-18,references/getting-started.md:66-69,references/data-download.md:13-18,references/common-issues.md:47,references/common-issues.md:54-58, andreferences/results.md:69-74
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumThe documentation recommends installing several packages without fixed versions or integrity hashes.
bash pip install modalpython image = modal.Image.debian_slim(python_version="3.11").pip_install( "torch", "einops", "numpy", )Other examples use the same pattern and additionally install
huggingface_hubwithout a version constraint:python image = modal.Image.debian_slim(python_version="3.11").pip_install( "torch", "einops", "numpy", "huggingface_hub", )Technical Analysis
Package names without exact version constraints resolve to mutable upstream releases. Consequently, two executions of the same documented command can install different code. If an upstream account, release process, package registry, or dependency is compromised, following these instructions could introduce attacker-controlled code into the local environment or Modal image.
No typo-squatted package, untrusted package index, or currently malicious dependency was identified. The risk arises from the lack of reproducible version and integrity controls rather than evidence that the named packages are malicious.
Attack Path
- An attacker compromises an upstream package, its maintainer account, release pipeline, or a transitive dependency.
- The attacker publishes a malicious release under a package name referenced by the documentation.
- A user runs
pip install modalor builds a Modal image using the unpinnedpip_install()declarations. - The package resolver selects the compromised release ...[truncated 761 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a reviewed exact version, for example
modal==X.Y.Z. - Maintain a lock file that records resolved transitive dependencies.
- Use package hashes where the installation workflow supports them, such as a hash-locked requirements file.
- Configure package installation to use only approved registries and prohibit unexpected extra indexes.
- Periodically scan dependencies for known vulnerabilities and update pins only after testing and review.
- Use minimal isolated build environments and avoid exposing runtime secrets during dependency installation.
- Document a controlled upgrade process so users do not need to install mutable latest releases.
- Pin every direct dependency to a reviewed exact version, for example
