T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:204
- Finding
- Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 204 **Vulnerability Type**: Supply-chain risk from an unpinned dependency **Risk Level**: Medium ### Vulnerable Code ```markdown - **Missing zai-sdk**: `pip install zai-sdk` (under anaconda) ``` ### Technical Analysis The Skill instructs users to install `zai-sdk` without specifying an exact version, integrity hash, or trusted package index. Consequently, the installed package and its transitive dependencies can change after the Skill has been reviewed. Python packages may execute package-controlled code during installation or when imported. If a future package release, transitive dependency, configured package index, or resolved distribution is compromised, following this instruction could execute malicious code under the privileges of the user running `pip`. The issue does not establish that the current `zai-sdk` package is malicious. The vulnerability is the absence of dependency pinning and integrity verification in the documented installation process. ### Attack Path 1. A user runs the video generation script without `zai-sdk` installed. 2. The import in `video_gen.py` fails, and the user follows the documented remediation command. 3. `pip` resolves the latest available package and dependencies from the user's configured package indexes. 4. An attacker who has compromised a resolved release, dependency, or package index supplies malicious package content. 5. Package installation or a subsequent import executes attacker-controlled code with the privileges of the user running the Skill. ### Impact Assessment Successful exploitation could execute arbitrary code in the Python environment and under the operating-system account performing the installation. Depending on that account's access, the attacker could read or modify project files, access environment variables such as `ZHIPU_API_KEY`, alter generated outputs, or compromise other resources available to the user. No privileg ...[truncated 103 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace the mutable installation command with a reviewed, exact version: ```bash python -m pip install zai-sdk==<reviewed-version> ``` 2. Maintain dependencies in a locked requirements file that includes cryptographic hashes: ```text zai-sdk==<reviewed-version> --hash=sha256:<verified-hash> ``` Install it with: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Pin and review all transitive dependencies, preferably through a reproducible lockfile. 4. Explicitly configure an approved HTTPS package index rather than relying on arbitrary user-level pip configuration. 5. Perform installation in an isolated virtual environment with minimal permissions. 6. Add an update process that reviews new versions before changing the lockfile or hashes. ]]>
