T08 · Insecure Dependencies
- Location
SKILL.md:28- Finding
Unpinned Runtime Dependencies Permit Supply-Chain Code Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 28
Vulnerability Type: Unpinned third-party dependencies installed from a mutable package source
Risk Level: MediumVulnerable Code Snippet:
bash python -m pip install -U alibabacloud_devops20210625 alibabacloud_tea_openapiTechnical Analysis
The documented installation command installs or upgrades the Alibaba Cloud SDK packages without version constraints, integrity hashes, or a lockfile. Consequently, the code installed at runtime can differ from the code originally reviewed with this Skill.
Python package installation can execute package build and installation logic. The installed SDK is then imported by
scripts/_devops_client.pyand receives Alibaba Cloud access-key credentials and an optional security token. A compromised, malicious, or unexpectedly incompatible future package release could therefore execute locally and access those credentials.The package names are consistent with the declared Alibaba Cloud functionality, and the audit found no evidence that they are intentionally malicious. The risk arises from mutable and unverified dependency resolution.
Attack Path
- An attacker compromises a package publisher account, package registry, release pipeline, or future dependency release.
- The attacker publishes a malicious version under one of the documented package names.
- A user follows the Skill instructions and runs the unpinned command with
-U. pipresolves and installs the attacker-controlled release.- Malicious installation logic may execute immediately. Malicious runtime logic may also execute when
_devops_client.pyimports the SDK. - The altered SDK can read process-accessible credentials and intercept credentials assigned to the SDK configuration.
- The attacker may exfiltrate credentials or issue Alibaba Cloud API requests within the permissions of the configured identity.
Impact Assess
...[truncated 649 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every direct dependency to a reviewed exact version:
bash python -m pip install \ alibabacloud_devops20210625==<reviewed-version> \ alibabacloud_tea_openapi==<reviewed-version> -
Generate a fully resolved lock or requirements file that also pins transitive dependencies.
-
Require package hashes and install with
pip install --require-hashes -r requirements.txt. -
Remove
-Ufrom normal setup instructions so installation does not silently move to unreviewed releases. -
Use an approved package index or internal artifact mirror and explicitly configure the trusted index.
-
Review dependency provenance, release signatures or attestations, and vulnerability scan results before updating pins.
-
Run installation and scripts in a dedicated virtual environment under a non-privileged account.
-
Continue using a least-privilege, preferably short-lived, cloud identity limited to required read-only DevOps APIs.
-
