T08 · Insecure Dependencies
- Location
SKILL.md:24- Finding
Unpinned Dependency Installation from a Third-Party Package Mirror
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 24-26
Vulnerability Type: Supply-chain exposure through an unpinned dependency and unsafe package source
Risk Level: Mediumbash # 国内环境 pypi.org 经常超时,直接用清华镜像 cd "C:\Users\17551\.workbuddy\binaries\python\envs\default" ./Scripts/pip.exe install openpyxl -i https://pypi.tuna.tsinghua.edu.cn/simple --timeout 30Technical Analysis
The Skill directs the agent to install
openpyxlwithout pinning a reviewed version or verifying the downloaded artifact with a cryptographic hash. It also explicitly overrides the package index with a third-party mirror.Consequently, package selection and content may change after the Skill has been audited. The installed artifact depends on whatever compatible release and files the configured mirror serves at execution time. Compromise of the mirror, its synchronization process, the upstream package, or package-maintainer credentials could therefore introduce attacker-controlled package content. Python package installation may execute build-system or installation-related code, depending on the distributed artifact and the behavior of the package-management tool.
The hard-coded, user-specific managed-environment path is also non-portable and may cause unintended environment modification, but it is not independently treated as a security vulnerability in this report.
Attack Path
- An attacker compromises the configured mirror, its package synchronization channel, an upstream release, or relevant publisher credentials.
- The attacker causes a malicious or altered
openpyxldistribution to be offered by the configured package index. - The agent follows the documented
pip installinstruction. - Because no version or artifact hash is enforced,
pipaccepts the package selected from the mirror. - Malicious installation or imported package code executes under the account running the managed Python environment. ...[truncated 625 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
openpyxlto a reviewed, known-good version rather than resolving the latest available release. - Store dependencies in a version-controlled lock file or requirements file with cryptographic hashes.
- Install with hash enforcement, for example:
bash pip install --require-hashes -r requirements.txt - Prefer the canonical PyPI index over an explicitly configured third-party mirror. If organizational policy requires a mirror, use a controlled internal repository that validates upstream signatures or hashes and retains approved artifacts.
- Configure
pipto accept binary wheels only where feasible, reducing exposure to source-build execution:bash pip install --only-binary=:all: --require-hashes -r requirements.txt - Perform installation in a dedicated, least-privilege virtual environment rather than relying on a hard-coded user-specific path.
- Separate dependency provisioning from normal Skill execution and require dependencies to be reviewed and installed by a trusted deployment process.
- Pin
