T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:13
- Finding
- Unpinned Third-Party Python Dependencies## Vulnerability Details **File Location**: `SKILL.md:13-16` and `SKILL.md:90-93` **Vulnerability Type**: Unpinned and insufficiently verified third-party dependencies **Risk Level**: Medium ### Vulnerable Code `SKILL.md:13-16`: ```yaml - id: zhdate kind: python-package package: zhdate label: Install zhdate for Chinese calendar ``` `SKILL.md:90-93`: ```bash pip install zhdate pypinyin opencc ``` ### Technical Analysis The skill directs users or an automated installer to retrieve Python packages without specifying reviewed versions, package hashes, or an explicitly trusted package index. Dependency resolution can consequently select whatever releases are current when installation occurs. Python packages may execute installation-related code and later execute package-controlled code when imported. If an upstream account, package release, configured package index, or dependency is compromised, installation can introduce attacker-controlled code even though the reviewed skill artifact itself contains no malicious script. The installation metadata declares only `zhdate`, while the documentation additionally directs installation of `pypinyin` and `opencc`. This discrepancy makes dependency review and reproducible deployment more difficult. ### Attack Path 1. An attacker compromises a listed package, one of its transitive dependencies, or a package index used by the environment. 2. The attacker publishes a malicious release that still satisfies the unrestricted package names. 3. A user or Agent follows the skill installation instructions and runs `pip install zhdate pypinyin opencc`, or installs `zhdate` through the skill metadata. 4. The package manager retrieves the malicious release because no version or cryptographic hash restricts selection to a previously reviewed artifact. 5. Attacker-controlled code executes during installation or when the installed package is subsequently imported. ### Impac ...[truncated 498 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to a reviewed, exact version in both the installation metadata and documentation. 2. Generate a locked requirements file containing cryptographic hashes, and install it with `pip install --require-hashes -r requirements.txt`. 3. Configure an explicit trusted package index rather than relying on ambient or user-controlled pip configuration. 4. Review and lock transitive dependencies as well as direct dependencies. 5. Keep the metadata dependency list synchronized with the documented list so that `zhdate`, `pypinyin`, and `opencc` receive the same review and version controls. 6. Install packages in an isolated virtual environment under a non-privileged account. Do not use administrative installation unless strictly necessary. 7. Perform dependency vulnerability and provenance checks as part of release preparation, and update locked versions only after review and testing.
