T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:34
- Finding
- Unpinned Third-Party SDK Dependency Creates Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:34` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code Snippet ```bash pip install tencentcloud-sdk-python ``` ### Technical Analysis The installation instruction retrieves the latest available version of `tencentcloud-sdk-python` without enforcing a reviewed version or validating an integrity hash. Consequently, the code installed and subsequently imported may differ from the version originally reviewed. This does not establish that the named SDK is malicious. However, it creates supply-chain exposure if the package repository, publisher account, distribution artifact, dependency tree, or package-resolution environment is compromised. Installation from an untrusted or misconfigured Python package index could further increase this risk. The application imports and executes the installed SDK in `scripts/main.py`, including modules responsible for credentials, HTTP communication, and API requests. A compromised dependency would therefore execute in the context of the user running the Skill. ### Attack Path 1. An attacker compromises a future SDK release, one of its transitive dependencies, the publisher account, or the package source used by the victim. 2. A user follows the documented unpinned installation command. 3. Package resolution selects the compromised or unexpectedly changed release. 4. Malicious code executes during package installation or when `scripts/main.py` imports the SDK. 5. The malicious package can access resources available to the current process, potentially including Tencent Cloud credentials in environment variables, local files readable by the user, and network access. ### Impact Assessment Successful exploitation could provide code execution with the privileges of the user installing or running the Skill. The accessible scope may include: - `TENCENTCLOUD_SECRET_ID` and `TENCENTCLOUD_SECRET_KEY` - Files readable or w ...[truncated 383 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the SDK to a reviewed, exact version, for example: ```text tencentcloud-sdk-python==REVIEWED_VERSION ``` 2. Place the dependency in a lock file or requirements file with cryptographic hashes, and install it with hash verification: ```bash pip install --require-hashes -r requirements.txt ``` 3. Review and pin all transitive dependencies where the packaging workflow permits. 4. Explicitly use the trusted package index and prevent fallback to untrusted indexes. 5. Integrate dependency vulnerability and provenance checks into release validation. 6. Run the Skill in an isolated environment with only the required filesystem, network, and environment-variable access. 7. Restrict the Tencent Cloud credentials through IAM to only the facial-liveness API operations required by the Skill. ]]>
