T08 · Insecure Dependencies
- Location
SKILL.md:64- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 64
Vulnerability Type: Unpinned dependency and insufficient package integrity controls
Risk Level: LowVulnerable Code
bash pip3 install requestsTechnical Analysis
The installation instruction resolves the
requestspackage without specifying a reviewed version, cryptographic hashes, a lockfile, or an explicit trusted package index. Consequently, the dependency installed in the future may differ from the version present when the Skill was audited.Although
requestsis a legitimate and widely used package, this installation pattern does not protect against compromise of a future release, package-index substitution through local pip configuration, or installation of an incompatible release. Package code may execute during installation and will execute when imported byscripts/kimi_search.py.Attack Path
- An attacker compromises a future release of the dependency or influences the package index used by the victim's pip configuration.
- A user or agent follows the documented
pip3 install requestsinstruction. - Pip resolves and installs the attacker-controlled or otherwise unreviewed package version.
- Malicious package code executes during installation or when
kimi_search.pyimportsrequests. - The code runs with the privileges of the user invoking pip or the Skill and can access resources available to that process.
This attack requires compromise or substitution of the dependency distribution path; the repository itself does not contain a malicious dependency.
Impact Assessment
Successful exploitation could provide code execution with the invoking user's privileges. Depending on the runtime environment, attacker-controlled dependency code could access local files readable by that user, environment variables such as
REDFOX_API_KEY, the submitted search query, and available network resources. The impact is li ...[truncated 93 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
requestsand its transitive dependencies to versions that have been reviewed and tested. - Store dependency versions in a committed requirements or lock file.
- Record and enforce cryptographic hashes with pip's
--require-hashesoption. - Use an explicitly approved package index rather than relying on mutable local pip configuration.
- Automate dependency vulnerability scanning and controlled update review.
Example hardened installation workflow:
bash python3 -m pip install \ --index-url https://pypi.org/simple \ --require-hashes \ -r requirements.txtThe associated
requirements.txtshould contain exact versions and verified SHA-256 hashes for every direct and transitive dependency.- Pin
