T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:16
- Finding
- Unpinned Third-Party SDK Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 16–20 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ```bash - Install SDK (virtual environment recommended to avoid PEP 668 restrictions): ```bash python3 -m venv .venv . .venv/bin/activate python -m pip install dashscope ``` ### Technical Analysis The Skill instructs users to install `dashscope` without pinning an audited version or verifying the downloaded artifact with a cryptographic hash. Consequently, the installed package can change between executions even when the Skill itself remains unchanged. A Python virtual environment prevents dependency pollution of the system Python installation, but it is not a security sandbox. Package installation or build logic can execute with the permissions of the user running `pip`, including access to that user's files, environment variables, and permitted network resources. No evidence establishes that the current `dashscope` package is malicious. The vulnerability is the mutable and unverified dependency resolution process, which creates exposure if the package, a transitive dependency, the package publishing account, or the configured package index is compromised. ### Attack Path 1. An attacker compromises the package publishing process, a relevant dependency, or the package index used by `pip`. 2. The attacker publishes a malicious version or artifact that satisfies the unbounded `dashscope` requirement. 3. A user follows the Skill instructions and runs `python -m pip install dashscope`. 4. `pip` retrieves the attacker-controlled artifact because no version or hash constraint is specified. 5. Malicious installation or runtime code executes with the invoking user's privileges. 6. That code could access user-readable files, environment variables such as `DASHSCOPE_API_KEY`, and network resources available to the process. ### Impact Assessment Successful expl ...[truncated 422 chars]
- Remediation
- ## Remediation Suggestions - Pin `dashscope` to a specific version that has been reviewed and tested. - Place the dependency in a lock or requirements file and require cryptographic hashes, for example by using `pip install --require-hashes -r requirements.txt`. - Pin and hash all transitive dependencies where practical. - Configure an explicitly trusted Python package index rather than relying on uncontrolled index configuration. - Review release notes and package provenance before updating the pinned version. - Perform installation and API tests under a dedicated, non-privileged account or isolated container with access only to required files and network destinations. - Avoid exposing `DASHSCOPE_API_KEY` during dependency installation; provide the credential only to the subsequent API test process.
