T08 · Insecure Dependencies
- Location
SKILL.md:15- Finding
Unpinned PyPI Dependencies Installed at Runtime
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 15-21
Vulnerability Type: Unpinned third-party dependencies installed from a mutable package repository
Risk Level: Mediumyaml requires: bins: ["python3", "pip3"] install: - id: python-deps kind: exec command: "pip3 install requests beautifulsoup4 lxml fake-useragent python-dateutil matplotlib reportlab pillow" label: "Install Python dependencies"Technical Analysis
The installation command retrieves nine packages from the package index without specifying exact versions or validating artifact hashes. Consequently, the installed dependency set can change between executions despite the skill package itself remaining unchanged.
A compromised upstream release, maintainer account, package distribution channel, or transitive dependency could introduce malicious installation or runtime behavior. Python packages may execute build-backend or setup logic during installation, so compromise can affect the environment as soon as this command runs rather than only when a package is later imported.
No dependency lock file, hash-locked requirements file, isolated environment requirement, or trusted package-index configuration is present in the audited project. The reviewed files do not contain evidence that any currently named package is malicious; the finding concerns unsafe and non-reproducible supply-chain handling.
Attack Path
- An attacker compromises a listed PyPI package, one of its transitive dependencies, or the associated publishing credentials.
- The attacker publishes a malicious version that remains compatible with the unrestricted package requirement.
- The skill installation process executes the documented
pip3 installcommand. - Pip resolves and downloads the attacker-controlled release because no approved version or artifact hash is enforced.
- Malicious package installation hooks or subsequently importe ...[truncated 771 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the inline package list with a reviewed lock file containing exact versions.
- Generate and enforce cryptographic hashes for every direct and transitive artifact, for example:
bash python3 -m pip install --require-hashes -r requirements.lock - Build the lock file through a controlled dependency-management process such as
pip-compile --generate-hashes, and review updates individually. - Install dependencies only inside a dedicated virtual environment or container under a non-privileged account.
- Use
python3 -m piptied to the intended interpreter instead of relying on a potentially ambiguouspip3executable. - Configure an approved package index or internal artifact mirror and prohibit fallback to untrusted repositories.
- Add automated dependency vulnerability and provenance scanning to release checks.
- Where practical, use prebuilt, verified wheels and disable source builds for environments that do not require them.
