T08 · Insecure Dependencies
- Location
SKILL.md:173- Finding
Unpinned Runtime Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:173
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code
markdown - **openpyxl 未安装**:先执行 `pip install openpyxl>=3.0.0` 安装依赖,再重试脚本。告知用户在安装依赖。English translation: If
openpyxlis not installed, executepip install openpyxl>=3.0.0before retrying the script.Technical Analysis
The skill instructs the agent to install a third-party Python package at runtime using an open-ended version constraint. The command does not specify an exact reviewed version, cryptographic hashes, a lockfile, an isolated environment, or an explicitly trusted package index.
Consequently, the installed artifact can vary over time. Package installation also executes package build and installation machinery, making dependency retrieval part of the effective execution path. This creates supply-chain exposure if a future compatible release, transitive dependency, configured package index, or intercepted repository response is compromised.
The audit found no evidence that
openpyxlitself is malicious. The issue is the unsafe dependency acquisition policy.Attack Path
-
A user requests generation of an Excel rubric.
-
The environment does not already contain
openpyxl. -
Following
SKILL.md, the agent executes:bash pip install openpyxl>=3.0.0 -
pipresolves a mutable package version and any required dependencies from its configured index. -
If the selected artifact or package source has been compromised, attacker-controlled installation or runtime code executes with the privileges of the agent process.
-
The compromised component can then affect Excel generation and access resources available to that process.
This path depends on a compromised dependency or package source; no such compromise was demonstrated in the audited artifact.
Impact Assessment
Successful exploitation could execute arbitrary Python code with the sa ...[truncated 266 chars]
-
- Remediation
View remediation
Remediation Suggestions
- Pin
openpyxlto an exact, reviewed version rather than using>=3.0.0. - Maintain a lockfile containing cryptographic hashes and install with hash verification, such as
pip install --require-hashes. - Install dependencies inside a dedicated virtual environment with minimal permissions.
- Configure an explicit trusted package index instead of relying on ambient
pipconfiguration. - Review and pin transitive dependencies where applicable.
- Prefer bundling a reproducibly built, audited dependency environment.
- Require explicit user approval before modifying the runtime environment.
- Document failure behavior that does not silently install packages, such as returning setup instructions or producing the documented CSV fallback.
- Pin
