T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:14
- Finding
- Unpinned Third-Party Dependencies Create Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md:14` **Vulnerability Type**: Unpinned third-party package installation **Risk Level**: Medium ### Vulnerable Code ```bash pip install azure-cosmos azure-identity ``` ### Technical Analysis The installation instructions specify `azure-cosmos` and `azure-identity` without exact versions or package hashes. Consequently, each installation can resolve to different package artifacts depending on the package index state at that time. Although the package names correspond to expected Azure libraries, the project does not provide a lock file, hash verification, or a trusted-index requirement. A compromised package release, package index, or dependency could therefore introduce code that was not included in this audit. Python packages may execute code during installation or when imported by the setup script. ### Attack Path 1. An attacker compromises a relevant package release, transitive dependency, or configured Python package index. 2. The attacker publishes a malicious or modified version under a version range accepted by the unpinned command. 3. A user follows the documented installation command. 4. `pip` resolves and downloads the attacker-controlled artifact. 5. Malicious code executes during installation or when the package is imported by `setup_cosmos_container.py`. ### Impact Assessment Malicious dependency code would generally execute with the privileges of the user running `pip` or the setup script. It could access environment variables such as `COSMOS_KEY` and `COSMOS_ENDPOINT`, steal Azure credentials available to `DefaultAzureCredential`, modify local files, or perform arbitrary network operations. If installation is performed by a privileged account, the impact could extend to system-wide compromise.
- Remediation
- ## Remediation Suggestions - Pin every direct dependency to a reviewed exact version. - Maintain a lock file or hash-verified requirements file, for example using `--require-hashes`. - Pin and review transitive dependencies as well as direct dependencies. - Install packages only from an explicitly trusted package index. - Use automated dependency scanning and a controlled process for reviewing and updating pinned versions. - Run installation and the CLI under a dedicated, least-privileged virtual environment without unnecessary credentials.
