T08 · Insecure Dependencies
- Location
workflows/main.md:149- Finding
Unpinned Runtime Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
workflows/main.md, line 149
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumComplete Code Snippet:
markdown - Prefer python-docx (`pip install python-docx`)Technical Analysis
The workflow recommends installing
python-docxwithout specifying an audited version, validating package hashes, using a lockfile, constraining the package index, or requiring an isolated environment. Consequently, the installed package and its transitive dependencies may vary between executions.This creates a supply-chain exposure: if a selected release or one of its dependencies is compromised, the malicious package could execute code during installation or when imported for document processing. The project contains no evidence that
python-docxitself is malicious; the issue is the unsafe and non-reproducible dependency installation instruction.Attack Path
- A user invokes the skill to modify a Word document.
- The workflow recommends
pip install python-docx. - The command resolves the latest compatible package and dependencies from the configured Python package index without integrity verification.
- If the index, selected release, dependency, or local package-index configuration has been compromised, attacker-controlled code is installed.
- Malicious installation hooks or imported package code execute with the privileges of the user running the workflow.
Impact Assessment
Successful exploitation could allow arbitrary code execution with the invoking user's privileges. Depending on those privileges and the environment, the attacker could access or modify documents and other user-readable files, steal accessible credentials, or alter subsequent processing. No privilege-escalation mechanism is present in the audited project, so impact is limited to the permissions already held by the process executing the installation.
- Remediation
View remediation
Remediation Suggestions
- Replace the unversioned installation instruction with an explicitly pinned, reviewed version.
- Maintain dependencies in a lockfile or requirements file with cryptographic hashes, and install them using hash enforcement such as
pip install --require-hashes. - Explicitly use an approved package index and disable unintended additional indexes to reduce dependency-confusion risk.
- Install dependencies inside a dedicated virtual environment with least-privilege permissions.
- Review and pin transitive dependencies where applicable.
- Prefer a preinstalled and centrally managed dependency rather than performing runtime installation.
- Periodically scan pinned packages for known vulnerabilities and update them through a controlled review process.
