T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 20
Vulnerability Type: Unpinned and unverifiable third-party dependency
Risk Level: MediumVulnerable Code:
bash pip3 install requestsTechnical Analysis
The installation instruction retrieves
requestswithout a version constraint, cryptographic hash, lockfile, or explicitly trusted package index. Consequently, the component installed by this command can change over time without any corresponding change to the reviewed project.If the package source, release process, package index, or dependency-resolution path is compromised, pip could retrieve an attacker-controlled distribution. Source distributions and build dependencies can execute code during package construction, while malicious package code could execute later when imported. The instruction also does not isolate the dependency in a virtual environment, potentially affecting the user's broader Python environment.
No malicious dependency is present in the audited artifact, and no active compromise was established. The finding concerns the unsafe and non-reproducible dependency installation procedure.
Attack Path
- An attacker compromises a relevant package release, transitive dependency, package-index account, or dependency-resolution channel.
- The user follows the documented
pip3 install requestsinstruction. - Pip resolves the mutable, unpinned package version and downloads the compromised component.
- Attacker-controlled code executes during package build/installation or when the installed library is subsequently imported.
- The code operates with the permissions of the user running pip or the application.
Impact Assessment
Successful exploitation could provide code execution with the privileges of the installing or application user. Accessible scope may include that user's files, environment variables, API credentials, Python environment, and network acces ...[truncated 180 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
requestsand all transitive dependencies to reviewed versions in a requirements or lock file. - Generate and verify cryptographic hashes, then install with
pip install --require-hashes -r requirements.txt. - Use a dedicated virtual environment rather than the user's global Python environment.
- Configure an approved package index and require HTTPS certificate validation.
- Automate dependency vulnerability and integrity scanning.
- Establish a controlled process for reviewing and updating pinned versions.
- Document an installation sequence such as:
bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt
- Pin
