T08 · Insecure Dependencies
- Location
SKILL.md:108- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:108-114
Additional Location:README.md:38-42
Vulnerability Type: Unpinned and unhashed third-party dependency installation
Risk Level: MediumComplete Vulnerable Code Snippet:
markdown ## Dependency Install once if needed: ```bash python -m pip install --user python-docxtext The same installation command is also documented in `README.md:38-42`. ### Technical Analysis The project instructs users to install `python-docx` without specifying a reviewed version, cryptographic hash, lock file, or trusted package index. Consequently, pip resolves the package and its transitive dependencies using the currently configured index at installation time. Although `python-docx` is consistent with the script's imported `docx` module and there is no evidence that the named package is currently malicious, the installation is not reproducible or cryptographically constrained. Its effective dependency contents can change after the Skill has been audited. The `--user` option installs the dependency into the user's persistent Python environment. This increases the lifetime and potential influence of a compromised or incompatible package beyond a single Skill execution. ### Attack Path 1. An attacker compromises a future release of the named package, one of its dependencies, or a package index configured in the user's pip environment. 2. The user follows the documented `python -m pip install --user python-docx` instruction. 3. Pip resolves the mutable package versions from the configured index without validating them against project-approved hashes. 4. The compromised distribution is downloaded and installed into the user's Python environment. 5. Malicious package installation or runtime behavior executes with the privileges of the user running pip. 6. Subsequent execution of `scripts/build_system_guidance_docx.py` imports the installed `docx` m ...[truncated 1017 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
python-docxand every transitive dependency to reviewed versions in a dependency lock or requirements file. - Record SHA-256 hashes and require pip to verify them using
--require-hashes. - Install dependencies in an isolated virtual environment rather than the persistent user-level environment.
- Use an explicitly approved package index or an internally controlled artifact repository.
- Apply the hardened installation instructions consistently in both
SKILL.mdandREADME.md. - Periodically review pinned dependencies for security advisories and update them through a controlled process.
Example hardened workflow:
bash python -m venv .venv .venv/bin/python -m pip install \ --index-url https://pypi.org/simple \ --require-hashes \ -r requirements.txtThe corresponding
requirements.txtshould pin exact versions and include reviewed hashes for all resolved packages.- Pin
