T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:40
- Finding
- Unpinned Third-Party SDK Dependency## Vulnerability Details **File Location**: `SKILL.md`, line 40 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Complete Code Snippet**: ```markdown - Dependency: `tencentcloud-sdk-python` (install via `pip install tencentcloud-sdk-python`) ``` ### Technical Analysis The installation instructions specify the `tencentcloud-sdk-python` package without pinning a reviewed version or requiring integrity hashes. Consequently, installation resolves to whichever compatible release the configured package index provides at that time. The dependency is imported and used by `scripts/main.py` to process Tencent Cloud credentials and user-supplied OCR documents. A malicious or compromised future package release could therefore execute code with the privileges of the user running the Skill. This is a supply-chain exposure rather than evidence that the currently named Tencent Cloud package is malicious. The flagged Base64 processing in `scripts/main.py` was also reviewed. It supports the documented OCR protocol by encoding a user-selected image or PDF for submission to `ocr.tencentcloudapi.com`, and by decoding returned Excel data when requested. No credential encoding, hidden destination, covert exfiltration channel, persistence mechanism, or embedded malicious payload was identified. ### Attack Path 1. An attacker compromises the package publisher, the package registry, a dependency release, or the package index used by the operator. 2. The attacker publishes a malicious version that remains compatible with the unpinned package requirement. 3. A user follows the documented `pip install tencentcloud-sdk-python` command. 4. The package manager installs the attacker-controlled release because no exact version or integrity hash is enforced. 5. Malicious package code executes during installation or when `scripts/main.py` imports the SDK. 6. The malicious code can access data available to the Skill process, p ...[truncated 758 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the SDK to an exact version that has been reviewed and tested, for example: ```text tencentcloud-sdk-python==<reviewed-version> ``` 2. Maintain dependencies in a version-controlled requirements or lock file rather than relying only on an ad hoc installation command. 3. Generate and enforce package hashes, such as by using `pip install --require-hashes -r requirements.txt`. 4. Install packages exclusively from an explicitly configured, trusted package index. 5. Use automated dependency scanning and controlled update reviews before changing the pinned version. 6. Run the Skill under a least-privileged account and restrict the Tencent Cloud credentials to only the OCR permissions required by this functionality. 7. Prefer an isolated virtual environment or container with narrowly scoped filesystem and network access.
