T08 · Insecure Dependencies
- Location
SKILL.md:64- Finding
Automatic Installation of Unpinned Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:64,72
Vulnerability Type: Unpinned and automatically installed dependencies
Risk Level: MediumVulnerable Code
yaml allowed-tools: - Bash(python3*) - Bash(pip*)bash python3 -m pip install easyocr opencv-python-headless Pillow rembg numpy onnxruntimetext 3. Check dependencies: On first use or when a script reports ModuleNotFoundError, automatically install dependencies.Technical Analysis
The Skill permits
pipexecution and instructs the Agent to install six third-party packages automatically. No versions, hashes, lockfile, or explicit trusted package index are specified. Consequently, package resolution depends on mutable package-index state at installation time, including the latest compatible direct and transitive dependencies.Python package installation and subsequent imports can execute package-controlled code with the privileges of the Agent process. The reviewed dependencies are consistent with the declared image-processing functionality, and the audit found no evidence that the repository intentionally names a known malicious or typosquatted package. Nevertheless, the installation process lacks supply-chain integrity controls.
The same unpinned command is also documented at
README.md:16:bash pip install opencv-python-headless Pillow numpy rembg onnxruntime easyocrAttack Path
- A user invokes OCR, background removal, or another feature whose dependency is absent.
- Following
SKILL.md:72, the Agent automatically invokes the unpinnedpipinstallation command. pipresolves direct and transitive packages from the configured package index at that moment.- If a dependency, transitive dependency, package-index account, or configured index has been compromised, attacker-controlled package code is installed.
- Installation hooks or imported module code executes under the Agent user's account when the package is installed or t ...[truncated 719 chars]
- Remediation
View remediation
Remediation Suggestions
-
Create a reviewed lockfile that pins every direct and transitive dependency to an exact version.
-
Record cryptographic hashes and install with hash verification, for example:
bash python3 -m pip install --require-hashes -r requirements.txt -
Configure an explicit trusted package index or an internally controlled package mirror rather than relying on ambient
pipconfiguration. -
Remove the instruction to install packages automatically after
ModuleNotFoundError. Ask for explicit user approval and display the exact packages, versions, index, and hashes before installation. -
Install dependencies in a dedicated virtual environment or restricted container with minimal filesystem and network permissions.
-
Scan and periodically review both direct and transitive dependencies for known vulnerabilities and unexpected ownership or release changes.
-
Update
README.md:16to use the same pinned, hash-verified installation process.
-
