T08 · Insecure Dependencies
- Location
SKILL.md:179- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:179andscripts/reference_contract.py:14-16
Vulnerability Type: Unpinned third-party dependency
Risk Level: LowVulnerable Code
SKILL.md:179:bash pip3 install requestsscripts/reference_contract.py:14-16:python try: import requests except ImportError: raise SystemExit("缺少 requests,请运行 pip3 install requests")Technical Analysis
The documented installation command retrieves the latest available
requestsrelease without specifying an exact version, integrity hash, lock file, or trusted package source. Consequently, installations are not reproducible and the dependency selected at installation time can differ from the version reviewed or tested by the project author.No evidence indicates that the legitimate
requestspackage is currently malicious. The risk arises if the configured package index, dependency resolution path, package publisher account, or an upstream release is compromised. A malicious or unexpectedly incompatible release could execute code during installation or when imported byreference_contract.py.Attack Path
- An attacker compromises an upstream package release, package publisher account, configured Python package index, or network/package-resolution environment.
- A user follows the documented
pip3 install requestscommand. pipresolves and installs the attacker-controlled or otherwise unreviewed release because no version or hash is enforced.- Malicious installation hooks or imported package code execute under the account running the command.
- The malicious dependency can access files, environment variables, and API credentials available to that account.
This exploitation path is conditional on supply-chain or package-index compromise; the audited project does not itself contain evidence of a malicious dependency.
Impact Assessment
Successful exploitat ...[truncated 397 chars]
- Remediation
View remediation
Remediation Suggestions
- Declare dependencies in a version-controlled requirements or lock file using an audited exact version.
- Enforce package integrity with hashes, for example through
pip install --require-hashes -r requirements.txt. - Install dependencies inside an isolated virtual environment under a nonprivileged account.
- Use an explicitly configured and trusted package index.
- Add automated dependency vulnerability and provenance scanning.
- Update the error message and documentation to reference the locked installation procedure rather than an unconstrained
pip3 install requestscommand.
