T08 · Insecure Dependencies
- Location
SKILL.md:32- Finding
Unpinned Third-Party Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:32-43
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
bash pip install torch einops numpy huggingface_hubpython image = modal.Image.debian_slim(python_version="3.11").pip_install( "torch", "einops", "numpy", "huggingface_hub" )Technical Analysis
The Skill installs third-party Python packages without pinning exact versions or verifying package hashes. Consequently, the dependencies resolved at execution time may differ from those reviewed during the audit.
Python packages can execute code during installation and import. If a package registry account, release pipeline, or resolved transitive dependency is compromised, a malicious release could execute with the permissions of the user or Modal container running the installation.
The dependencies are obtained from conventional package infrastructure rather than an evident typosquatting or personal package source. Therefore, this is a supply-chain hardening deficiency, not evidence that the currently named packages are malicious.
Attack Path
- An attacker compromises a package publisher, distribution account, build pipeline, or transitive dependency.
- The attacker publishes a malicious version under a dependency name accepted by the unpinned installation.
- A user invokes the documented installation or builds the Modal image.
- The package resolver selects the malicious or otherwise unreviewed release.
- Attacker-controlled code runs during installation, import, or subsequent package use.
Impact Assessment
A successfully compromised package could execute arbitrary code within the installation or training environment. It could access files, environment variables, network connectivity, allocated compute resources, and any credentials made available to that process.
The reviewed Skill does not request elevated host permi ...[truncated 244 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to an explicitly reviewed version.
- Generate and commit a lockfile that also fixes transitive dependency versions.
- Require package hashes, such as through a hash-locked requirements file and
pip install --require-hashes. - Build training images from reviewed, immutable base-image digests.
- Use a trusted internal package mirror or otherwise restrict the permitted package indexes.
- Run dependency vulnerability and provenance checks in CI before updating the lockfile.
- Rebuild dependencies in an isolated environment without unnecessary secrets or host filesystem access.
