T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Third-Party Package Installation from Mutable Remote Sources
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:27-33; duplicated inREADME.md:16-19
Vulnerability Type: Unpinned dependency installation from PyPI and a mutable Git repository
Risk Level: HighVulnerable Code
SKILL.md:27-33:bash # Option 1: PyPI (after official release) pip install pdf2word-review # Option 2: GitHub direct install (works today, recommended) pip install git+https://github.com/xiyanjun/pdf-to-word-review.gitREADME.md:16-19:bash pip install git+https://github.com/xiyanjun/pdf-to-word-review.git pdf2word input.pdf -o output.docx --verify --htmlTechnical Analysis
The Skill directs the Agent to install and execute an external package without pinning an audited package version, immutable Git commit, or artifact hash. In particular, the Git installation command resolves the repository's mutable default branch at installation time. Consequently, the code installed by this workflow can change after the Skill itself has been audited.
Python package installation may execute attacker-controlled build backend logic, setup hooks, dependency installation behavior, and package initialization code. The subsequent
pdf2wordinvocation also directly executes the installed package while processing user-controlled or potentially sensitive PDF documents.This project contains only documentation and does not vendor the conversion engine. Therefore, the effective implementation and its transitive dependencies cannot be verified from the audited project contents. This is a supply-chain weakness rather than proof that the currently referenced upstream project is malicious.
Attack Path
- An attacker compromises the upstream GitHub repository, its maintainer account, the PyPI project, or an unpinned transitive dependency.
- The attacker adds malicious package build logic or runtime code to the version resolved by the unpinned installation command.
- An Agent f ...[truncated 1289 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace unversioned PyPI installation with an exact, reviewed version:
bash python -m pip install "pdf2word-review==<audited-version>" -
If Git installation is unavoidable, pin an immutable, reviewed full commit hash rather than the mutable default branch:
bash python -m pip install \ "pdf2word-review @ git+https://github.com/xiyanjun/pdf-to-word-review.git@<full-reviewed-commit-hash>" -
Prefer a locked requirements file containing hashes for the package and all transitive dependencies, and install it with hash verification:
bash python -m pip install --require-hashes -r requirements.lock -
Remove wording that recommends direct installation from a mutable Git branch. Document the exact upstream revision that was reviewed and establish a controlled process for reviewing and updating that revision.
-
Install and execute the converter in an isolated virtual environment or sandbox with minimum filesystem and network access. Do not run installation or conversion as an administrator or root user.
-
Restrict the converter to only the required input and output directories. Disable outbound network access during document processing unless it is explicitly required.
-
Verify package provenance where available, review release signatures or attestations, and continuously scan pinned direct and transitive dependencies for compromise and known vulnerabilities.
-
