T08 · Insecure Dependencies
- Location
SKILL.md:488- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:488
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable Code
bash pip install zhdate chinese-calendarTechnical Analysis
The installation instruction retrieves
zhdateandchinese-calendarfrom the user's configured Python package index without fixed versions, package hashes, a lockfile, or a verified source constraint. Consequently, the dependencies resolved at installation time may differ from those reviewed or tested by the project author.Python packages may execute code during installation and when imported. The script imports these packages at runtime for lunar-date and solar-term functionality. If a package release, its maintainer account, the configured package index, or the dependency-resolution path is compromised, attacker-controlled code could execute with the privileges of the user running the installation or script.
The audit found no evidence that these packages are currently malicious. The issue is the mutable and insufficiently verified supply-chain boundary.
Attack Path
- An attacker compromises a dependency release, maintainer account, package-index mirror, or another relevant package-resolution component.
- The user follows the documented
pip install zhdate chinese-calendarinstruction. pipresolves the attacker-controlled version because the project imposes no version or hash restrictions.- Malicious package code executes during installation or when
date_manager.pyimports the dependency. - The payload operates with the invoking user's privileges and can access resources available to that account.
Impact Assessment
Successful exploitation could permit arbitrary Python code execution under the invoking user's account. The accessible scope could include the project's date records, files readable or writable by that user, environment variables, and network resources available to the process. This fi ...[truncated 126 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin each dependency to a specifically reviewed version.
- Generate a lockfile or requirements file containing cryptographic hashes.
- Install with hash verification, for example:
bash python -m pip install --require-hashes -r requirements.txt- Use an explicitly documented and trusted package index rather than relying silently on arbitrary user configuration.
- Review direct and transitive dependencies before updating pinned versions.
- Run dependency installation and the Skill with least privilege, preferably in an isolated virtual environment or container.
- Add automated dependency vulnerability and integrity checks to the release process.
