T08 · Insecure Dependencies
- Location
SKILL.md:420- Finding
Unpinned Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 420
Vulnerability Type: Unpinned third-party package installation
Risk Level: MediumVulnerable Code:
bash pip install pandas numpy scipyTechnical Analysis
The installation command retrieves
pandas,numpy, andscipywithout pinning reviewed versions, verifying package hashes, using a lockfile, or explicitly restricting resolution to a trusted package index. Consequently, the code installed in the future may differ from the dependencies represented at audit time.Python package installation can execute package build and installation logic. If the package repository, an upstream release, the package-resolution configuration, or the network path is compromised, following this command could result in execution of attacker-controlled code. Unpinned dependencies also introduce non-malicious dependency drift, potentially changing analytical results or breaking compatibility.
Attack Path
- An attacker compromises an upstream package release, dependency, configured package index, or package-delivery path.
- A user follows the dependency installation instructions in
SKILL.md. pipdynamically resolves and downloads the affected mutable package artifact.- Malicious build or installation logic executes with the privileges of the user running
pip. - The installed package can execute additional malicious behavior when imported by the cost-analysis code.
This path requires compromise or malicious manipulation of the dependency supply chain; the audited project does not itself specify a malicious package or external package source.
Impact Assessment
Successful exploitation could execute code with the privileges of the user who installs or imports the dependencies. Depending on those privileges, an attacker could access local files available to that user, including construction datasets processed by the Skill, modify the Python environment, tamper with ana ...[truncated 161 chars]
- Remediation
View remediation
Remediation Suggestions
- Move dependency declarations into a version-controlled requirements or lock file.
- Pin each direct and transitive dependency to a reviewed version.
- Record and enforce cryptographic hashes using
pip install --require-hashes -r requirements.txt. - Explicitly use an approved HTTPS package index and prevent fallback to untrusted indexes.
- Install dependencies in an isolated virtual environment with no unnecessary privileges.
- Use automated dependency scanning and periodically update pins through a controlled review process.
- Test dependency updates for analytical correctness and compatibility before release.
Example hardened installation pattern:
bash python -m venv .venv . .venv/bin/activate python -m pip install --index-url https://pypi.org/simple \ --require-hashes -r requirements.txt
