T08 · Insecure Dependencies
- Location
SKILL.md:261- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 261-264
Vulnerability Type: Supply-chain risk from an unpinned dependency
Risk Level: LowVulnerable Code:
bash # Requires: pip install requests export DIDIT_API_KEY="your_api_key" python scripts/validate_database.py --id-number 12345678 --country PER --first-name Carlos --last-name Garcia python scripts/validate_database.py --id-number GARC850315HDFRRL09 --country MEXTechnical Analysis
The installation instruction requests the latest resolvable version of
requestswithout a version constraint, lockfile, package hash, or trusted-index restriction. Consequently, the dependency selected during installation can differ from the version reviewed or tested by the Skill author.This does not establish that the legitimate
requestspackage is malicious. The risk arises if a package release, configured package index, dependency in the resolved graph, or package-distribution account is compromised. Python package installation may execute package build logic, and imported package code runs with the privileges of the user invoking the validation script.Attack Path
- An attacker compromises a dependency release, package distribution account, package index, or dependency resolved by the unpinned installation.
- A user follows the documented
pip install requestsinstruction. pipresolves and installs the compromised distribution because no audited version or hash is required.- Malicious code executes during package installation or when
validate_database.pyimportsrequests. - The malicious package inherits the invoking user's privileges and may access process-readable data, including
DIDIT_API_KEYwhen the script runs.
Impact Assessment
Successful exploitation could execute arbitrary code with the permissions of the user running
pipor the validation script. Depending on that user's privileges, the attacker coul ...[truncated 384 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
requestsand its transitive dependencies to versions that have been reviewed and tested. - Maintain the dependency set in a lockfile generated by a tool such as
pip-tools. - Require cryptographic package hashes during installation, for example through a hashed requirements file and
pip install --require-hashes -r requirements.txt. - Install dependencies in an isolated virtual environment rather than a system-wide or privileged environment.
- Use an explicitly trusted package index and avoid unreviewed mirrors or environment-controlled index overrides.
- Regularly scan and update pinned dependencies through a controlled review process.
- Pin
