T08 · Insecure Dependencies
- Location
SKILL.md:28- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 28-32
Vulnerability Type: Unpinned dependency and non-reproducible installation
Risk Level: MediumComplete Code Snippet:
markdown ### 2. Install dependencies ```bash pip install requeststext ### Technical Analysis The installation instructions retrieve the latest version of `requests` and its transitive dependencies at installation time. No exact version, integrity hash, lock file, or reviewed package index is specified. The code subsequently imports and executes this package in `send_image.py`. This makes the installed code non-reproducible and allows its behavior to change after the Skill has been reviewed. A compromised upstream release, dependency-chain compromise, unsafe package-index configuration, or malicious package mirror could introduce attacker-controlled code into the runtime environment. There is no evidence that the current `requests` package is malicious. The vulnerability is the absence of controls ensuring that users install the same reviewed dependency artifact. ### Attack Path 1. An attacker compromises an applicable package release, transitive dependency, configured package index, or package mirror. 2. A user follows the documented `pip install requests` instruction. 3. `pip` resolves and installs the attacker-controlled or compromised artifact because no version or hash is enforced. 4. The user invokes `send_image.py`. 5. Python imports the installed `requests` package, executing its module initialization code. 6. Malicious dependency code runs with the privileges of the user executing the Skill. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the invoking user's account. That code could access files, environment variables, and network resources available to that user, including the Feishu credentials loaded during normal operation. The dependency itself does no ...[truncated 142 chars]- Remediation
View remediation
Remediation Suggestions
- Create a dependency file containing an exact, reviewed version of
requestsand exact versions of all transitive dependencies. - Record cryptographic hashes for every accepted distribution and install with:
bash pip install --require-hashes -r requirements.txt - Generate and review a lock file using an established dependency-management tool.
- Install dependencies in a dedicated virtual environment rather than a shared or privileged Python environment.
- Use only trusted package indexes and explicitly configure the approved index where practical.
- Add automated dependency and vulnerability scanning while ensuring updates are reviewed before changing the lock file.
- Create a dependency file containing an exact, reviewed version of
