T08 · Insecure Dependencies
- Location
SKILL.md:63- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 63-67
Vulnerability Type: Unpinned and unverified third-party dependency
Risk Level: MediumVulnerable Code
markdown Install if needed: ```bash pip install python-docxtext The dependency is subsequently imported in `scripts/md_to_word.py`, lines 17-24: ```python try: from docx import Document from docx.shared import Pt, Inches, Cm, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT from docx.oxml.ns import qn from docx.oxml import OxmlElement except ImportError: print("Error: python-docx is required. Install with: pip install python-docx") sys.exit(1)Technical Analysis
The installation instruction retrieves
python-docxwithout pinning a reviewed version, validating package hashes, specifying a trusted package index, or using a dependency lock file. As a result, dependency resolution is mutable and depends on the package index andpipconfiguration present at installation time.This is a supply-chain weakness rather than evidence that the named package is currently malicious. Exploitation would require compromise or manipulation of an applicable package source, release, dependency, or package-resolution configuration. Malicious installation hooks could run during installation, while malicious package code could run when the converter imports the dependency.
Attack Path
- A user or Agent attempts to use the converter without
python-docxinstalled. - The user follows the documented
pip install python-docxinstruction. pipresolves content from its configured package source without a pinned version or required hash.- An attacker who has compromised or influenced that source or its resolution path supplies malicious package content.
- Attacker-controlled code executes during installation or when
scripts/md_to_word.pyimports the installed package.
Impact Asse
...[truncated 670 chars]
- A user or Agent attempts to use the converter without
- Remediation
View remediation
Remediation Suggestions
-
Declare the dependency in a version-controlled requirements file using a reviewed, exact version.
-
Record and enforce cryptographic hashes, for example:
text python-docx==REVIEWED_VERSION --hash=sha256:VERIFIED_DISTRIBUTION_HASH -
Install it with strict hash validation:
bash python -m pip install --require-hashes -r requirements.txt -
Generate hashes separately for every supported platform and artifact, or constrain installation to a specifically reviewed distribution.
-
Use an isolated virtual environment and avoid elevated installation.
-
Explicitly configure a trusted package index rather than relying on uncontrolled global or user-level
pipsettings. -
Add automated dependency scanning and a controlled process for reviewing and updating pinned versions.
-
Update the script's
ImportErrormessage so it points to the verified requirements-based installation procedure instead of recommending the unpinned command.
-
