T08 · Insecure Dependencies
- Location
SKILL.md:43- Finding
Unpinned Python dependencies create a mutable software supply-chain risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 43
Vulnerability Type: Unpinned third-party dependencies
Risk Level: Mediumbash pip install huaweicloudsdk-cce huaweicloudsdk-coreTechnical Analysis
The documented installation command installs
huaweicloudsdk-cceandhuaweicloudsdk-corewithout fixed versions or package hashes. As a result, the packages and their transitive dependencies are resolved dynamically from the package index configured on the user's system.The reviewed dependency contents can therefore differ from the versions installed later. If a package release, transitive dependency, package-index account, or configured index is compromised,
pipmay retrieve attacker-controlled content. Depending on the selected distribution and build process, malicious code could execute while a source distribution is built or when the installed package is subsequently imported.The project also instructs users to configure Huawei Cloud access credentials. Consequently, malicious dependency code executing in the same process or user environment may be able to read those environment variables.
Attack Path
- An attacker compromises a future release of a listed package, one of its transitive dependencies, or a package source trusted by the victim.
- A user follows the documented prerequisite and runs the unpinned
pip installcommand. pipresolves the compromised version because no reviewed version or integrity hash is required.- Attacker-controlled code executes during package building, installation, or a later package import.
- The code operates with the privileges of the user running
pipor the Skill and can access resources available to that account. - If Huawei Cloud credentials have been exported into the same environment, the malicious code may read and disclose them.
- Stolen credentials could then be used within the permissions assigned to the associated Huawei ...[truncated 627 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to an explicitly reviewed version, for example:
text huaweicloudsdk-cce==<reviewed-version> huaweicloudsdk-core==<reviewed-version> - Generate and commit a lock file containing all transitive dependencies.
- Require package hashes during installation, such as through a hash-locked requirements file and
pip install --require-hashes. - Use only an explicitly configured, trusted package index. Consider an internally controlled package mirror containing approved artifacts.
- Review dependency updates before changing pinned versions and use automated vulnerability and provenance checks.
- Install dependencies in an isolated virtual environment under a non-privileged account; do not run
pipas root. - Avoid exposing cloud credentials during dependency installation. Provide credentials only to the final runtime process after all packages have been installed and verified.
- Apply least-privilege IAM permissions and rotate credentials immediately if dependency compromise is suspected.
- Pin every direct dependency to an explicitly reviewed version, for example:
