T08 · Insecure Dependencies
- Location
SKILL.md:73- Finding
Unpinned Runtime Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:73; related dependency instructions also appear atscripts/imagegen.py:7andscripts/imagegen.py:21
Vulnerability Type: Unpinned third-party dependency
Risk Level: MediumVulnerable Code:
bash pip3 install requestsThe script repeats the same installation guidance when the dependency is unavailable:
python try: import requests except ImportError: print("缺少依赖:requests。请运行 pip3 install requests", file=sys.stderr) sys.exit(1)Technical Analysis
The installation command retrieves the current version of
requestsand its transitive dependencies from the Python package index configured in the user's environment. The project provides no version constraint, lock file, package hashes, or verified package source.Consequently, the installed code is determined at installation time rather than audit time. Risk can arise from a compromised package release, compromised transitive dependency, malicious package-index mirror, or hostile package-index configuration. Python packages may execute code during installation and will execute package code when imported by
imagegen.py.Attack Path
- The user follows the documented
pip3 install requestsinstruction. pipresolvesrequestsand its transitive dependencies from the user's configured index or mirror.- An attacker has compromised a resolved release, dependency, or configured mirror.
- The malicious artifact executes during installation or when
requestsis imported. - The payload runs with the privileges of the user invoking
pipor the Skill.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the invoking user's privileges. This may expose files, environment variables, the AI Hive API key, and other resources accessible to that account. If the installation command is run in a privileged environment, the im ...[truncated 163 chars]
- The user follows the documented
- Remediation
View remediation
Remediation Suggestions
- Declare a reviewed, exact version of
requestsand all transitive dependencies in a lock file. - Include cryptographic hashes and install with
pip install --require-hashes -r requirements.txt. - Recommend installation in a dedicated virtual environment rather than the user's global Python environment.
- Use a trusted package index and document the expected index URL.
- Add automated dependency vulnerability and integrity scanning to the release process.
- Periodically update the lock file through a controlled review process rather than resolving unrestricted versions at runtime.
- Declare a reviewed, exact version of
