T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:157
- Finding
- Unpinned Dependencies Installed into the System Python Environment## Vulnerability Details **File Location**: `SKILL.md:157-161` and `docs/quick-reference.md:9-13` **Vulnerability Type**: Unsafe dependency installation and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```bash pip3 install --break-system-packages \ tencentcloud-sdk-python \ cos-python-sdk-v5 \ python-dotenv ``` ### Technical Analysis The installation instructions retrieve third-party packages from the configured Python package index without pinning package versions or validating integrity hashes. Consequently, the dependency code installed and executed can change after the Skill has been reviewed. The `--break-system-packages` option bypasses protections for externally managed Python environments. This can modify or overwrite packages used by the host operating system or other applications. Installation scripts and imported package code execute with the privileges of the user running `pip3`. The dependency names are consistent with the declared Tencent Cloud functionality, and no evidence indicates that the named packages are intentionally malicious. The risk arises from mutable, unverified supply-chain content and installation into a shared system environment. ### Attack Path 1. A user follows the documented setup instructions. 2. `pip3` resolves the latest available versions from the configured package index. 3. An attacker compromises a dependency release, its maintainer account, the package index, or the dependency-resolution path. 4. The compromised package or transitive dependency executes installation or import-time code. 5. The code gains the privileges of the user running `pip3` and may modify the shared Python environment. 6. Because the Skill later receives Tencent Cloud credentials through environment variables, malicious imported dependency code could potentially access those credentials when the Skill runs. ### Impact Assessment Successful exploitation could execute a ...[truncated 266 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `--break-system-packages` from all installation instructions. 2. Require installation inside a dedicated virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 3. Pin every direct and transitive dependency to a reviewed version. 4. Record cryptographic hashes and install with `--require-hashes`. 5. Use a trusted or organization-controlled package index. 6. Add automated dependency vulnerability and provenance scanning. 7. Document the reviewed dependency versions in both `SKILL.md` and `docs/quick-reference.md`.
