T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:31
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:31` **Vulnerability Type**: Unpinned dependency installation and mutable supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```bash pip install tencentcloud-sdk-python ``` The same unpinned installation command is also recommended by the missing-dependency error handling in `scripts/main.py:169-175`. ### Technical Analysis The documented installation command retrieves the latest available release of `tencentcloud-sdk-python` without a version constraint, lockfile, package hash, or explicitly trusted package index. Consequently, the dependency code installed at a future date may differ from the code originally reviewed with this Skill. The package is imported into the primary Skill process. It therefore executes with the privileges of the user running the Skill and shares access to the process environment, including Tencent Cloud credentials and the facial images being processed. This finding does not establish that the current Tencent Cloud SDK is malicious. The vulnerability is the absence of controls that ensure users consistently install a known, reviewed dependency artifact. ### Attack Path 1. An attacker compromises the upstream package, its publishing account, the package repository, or a future package release. 2. A user follows the documented unpinned installation command. 3. Package management resolves and installs the attacker-controlled or compromised release. 4. The Skill imports the installed package when processing a request. 5. Malicious import-time or runtime code executes under the invoking user's account. 6. That code could read process environment variables, access submitted image data, modify API traffic, or perform other actions permitted to the user. ### Impact Assessment Successful exploitation could execute arbitrary Python code with the privileges of the user running the Skill. Within this process, compromised dependency code could potentially access: - `TEN ...[truncated 432 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the Tencent Cloud SDK to a specifically reviewed version: ```bash pip install "tencentcloud-sdk-python==REVIEWED_VERSION" ``` 2. Maintain a locked dependency manifest so installations resolve to reproducible versions. 3. Require package hashes, such as through a hash-locked requirements file and `pip install --require-hashes`. 4. Configure an explicitly trusted package index or an internally controlled dependency mirror. 5. Update the missing-dependency message in `scripts/main.py` so it recommends the same pinned and verified installation procedure. 6. Run the Skill in an isolated environment with minimal filesystem and network permissions. 7. Grant the Tencent Cloud credentials only the API permissions required for facial-landmark analysis. 8. Review dependency updates before changing the pinned version, including release provenance and transitive dependencies.
