T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Third-Party Dependencies Create Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:14
Vulnerability Type: Unpinned third-party package installation
Risk Level: MediumVulnerable Code
bash pip install azure-cosmos azure-identityTechnical Analysis
The installation instructions specify
azure-cosmosandazure-identitywithout 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
- An attacker compromises a relevant package release, transitive dependency, or configured Python package index.
- The attacker publishes a malicious or modified version under a version range accepted by the unpinned command.
- A user follows the documented installation command.
pipresolves and downloads the attacker-controlled artifact.- 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
pipor the setup script. It could access environment variables such asCOSMOS_KEYandCOSMOS_ENDPOINT, steal Azure credentials available toDefaultAzureCredential, 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
View 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.
