T08 · Insecure Dependencies
- Location
SKILL.md:22- Finding
Unpinned Python Dependencies Allow Supply-Chain Substitution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:22andSKILL.md:33; duplicated inREADME.md:25
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable code:
bash pip install akshare pandasTechnical Analysis
The installation instructions retrieve
akshareandpandaswithout exact version constraints or integrity hashes. Consequently, the installed code depends on whichever releases the configured Python package index serves at installation time. The effective dependency code can therefore change after this Skill has been reviewed.If a dependency release, package-maintainer account, package index, or package-resolution path is compromised, an attacker could distribute altered package code. Installation hooks or subsequently imported package code would execute with the privileges of the user running the Skill.
The audited Python script imports both dependencies at startup. Therefore, malicious code placed in either resolved package could also run whenever the commodity-fetching script is invoked.
Attack Path
- An attacker compromises a dependency publisher, package repository, or applicable package-resolution path.
- The attacker makes a malicious release of an unconstrained dependency available.
- A user follows the documented
pip install akshare pandasinstruction. pipresolves and installs the attacker-controlled release because no vetted version or hash is required.- Malicious installation or import-time code executes under the invoking user's account.
- The malicious dependency gains access to resources available to that account and can affect subsequent Skill execution.
Impact Assessment
Successful exploitation could execute arbitrary Python code with the privileges of the user installing or running the Skill. The accessible scope may include files, environment data, network access, and credentials available to that account. No ...[truncated 148 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every dependency to an exact, reviewed version.
- Maintain dependencies in a version-controlled requirements or lock file.
- Record and verify cryptographic hashes for all packages and transitive dependencies.
- Install with hash enforcement, for example:
bash python -m pip install --require-hashes -r requirements.txt - Configure an explicitly trusted package index rather than relying on ambient package-manager configuration.
- Review and update pinned dependencies through a controlled process that includes vulnerability scanning and functional testing.
- Apply the same hardened installation instructions consistently in both
SKILL.mdandREADME.md.
