T08 · Insecure Dependencies
- Location
SKILL.md:76- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:76,scripts/imagegen.py:7, andscripts/imagegen.py:19-22
Vulnerability Type: Supply-chain exposure through an unpinned runtime dependency
Risk Level: MediumVulnerable Code
SKILL.md:76:bash pip3 install requestsscripts/imagegen.py:7:python 依赖:requests(pip3 install requests)scripts/imagegen.py:19-22:python try: import requests except ImportError: print("缺少依赖:requests。请运行 pip3 install requests", file=sys.stderr) sys.exit(1)Technical Analysis
The project instructs users to install
requestsdirectly from the configured Python package index without specifying an exact reviewed version or verifying an integrity hash. The installed artifact can therefore change over time without any corresponding change to the audited project.Although
requestsis a legitimate and widely used package, an unpinned installation does not provide reproducible dependency resolution. The effective code executed by the Skill depends on the package version and package-index configuration present when the command is run. This creates exposure to:- A future compromise of the package or one of its transitive dependencies.
- A malicious or compromised package-index mirror.
- Unexpected dependency changes that introduce exploitable behavior.
- Environment-specific package substitution caused by a custom package-index configuration.
Attack Path
- An attacker compromises the configured package source, a dependency release, or a package-index mirror used by the target environment.
- The victim follows the documented
pip3 install requestsinstruction. - Because no version or hash is enforced,
pipdownloads the package currently selected by the package resolver. - Malicious installation hooks or imported package code execute under the privileges of the user running the installation or Skill.
...[truncated 796 chars]
- Remediation
View remediation
Remediation Suggestions
-
Add a dependency file that pins an explicitly reviewed version:
text requests==2.32.5 -
Generate and record cryptographic hashes for the package and all transitive dependencies.
-
Install dependencies with hash enforcement:
bash python3 -m pip install --require-hashes -r requirements.txt -
Use a lock-file workflow such as
pip-tools, Poetry, oruvto make dependency resolution reproducible. -
Configure installation to use a trusted package index and disable unexpected supplemental indexes where practical.
-
Integrate dependency vulnerability and integrity scanning into the release process.
-
Replace all bare
pip3 install requestsinstructions with the locked installation procedure.
-
