T08 · Insecure Dependencies
- Location
SKILL.md:74- Finding
Unpinned Huawei Cloud SDK Dependency Creates Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:74-78,SKILL.md:101-106,references/cli-installation-guide.md:8-12
Vulnerability Type: Unpinned third-party dependency
Risk Level: MediumVulnerable Code
SKILL.md:74-78:bash 1. **Python 3.8+** with the Huawei Cloud Python SDK installed: ```bash pip3 install huaweicloudsdkasm ```SKILL.md:101-106:markdown 6. **Handle errors** — If the call fails: - **Region not supported** (`region_id ... is not in the following supported regions`): the ASM service only supports `cn-north-4` — use that region. - **Credentials/permissions** (`APIGW.0802 forbidden` or a 403): the account lacks permission — verify the IAM policy grants the mesh list action. - **SDK not installed**: `pip3 install huaweicloudsdkasm`.references/cli-installation-guide.md:8-12:markdown ## Install the Huawei Cloud Python SDK for ASM ```bash pip3 install huaweicloudsdkasmtext ### Technical Analysis The installation instructions retrieve the latest available version of `huaweicloudsdkasm` from pip's configured package index without an exact version constraint, integrity hash, lock file, or explicitly trusted index. Consequently, the package installed at execution time may differ from the package that was reviewed. If the package publisher account, distribution infrastructure, or configured package index is compromised, a malicious newer release could be selected automatically. The Skill subsequently imports the installed package while Huawei Cloud access and secret keys are present in environment variables. Python package initialization code can execute during import and can access those credentials, local files available to the runtime user, and network resources. The static pre-scan's separate sensitive-network pattern is not itself evidence of malicious exfiltration. The reviewed commands use AK/SK cred ...[truncated 2107 chars]- Remediation
View remediation
Remediation Suggestions
-
Pin the Huawei Cloud SDK to a specifically reviewed release:
bash python3 -m pip install "huaweicloudsdkasm==<reviewed-version>" -
Record cryptographic hashes in a requirements file and require hash verification:
text huaweicloudsdkasm==<reviewed-version> --hash=sha256:<verified-hash>Install it with:
bash python3 -m pip install --require-hashes -r requirements.txt -
Pin and hash transitive dependencies as well, using a generated lock file from a controlled build process.
-
Explicitly use an approved package index or internal artifact mirror rather than inheriting arbitrary user-level pip index configuration.
-
Install the SDK in a dedicated virtual environment and run the Skill as a non-privileged OS user.
-
Continue enforcing the documented least-privilege IAM policy so that compromised credentials cannot perform operations beyond ASM mesh listing.
-
Establish a dependency-update process that reviews release notes, verifies package provenance and hashes, runs security checks, and updates the pinned version deliberately.
-
