T08 · Insecure Dependencies
- Location
scripts/requirements.txt:1- Finding
Unpinned Third-Party Dependencies Create a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
scripts/requirements.txt:1-5andscripts/setup.sh:27-33
Vulnerability Type: Unpinned dependency installation without integrity verification
Risk Level: MediumVulnerable Code
scripts/requirements.txt:1-5:text pypandoc>=1.13 anthropic>=0.40.0 openai>=1.0.0 python-docx>=1.1.0 rich>=13.0.0scripts/setup.sh:27-33:bash SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" REQ_FILE="$SCRIPT_DIR/requirements.txt" if [ -f "$REQ_FILE" ]; then pip3 install -q -r "$REQ_FILE" else pip3 install -q pypandoc anthropic python-docx rich fiTechnical Analysis
Every Python dependency is specified with an open-ended minimum version. The setup process consequently installs the newest version accepted by the constraints from the user's configured package index. There is no lock file, package hash verification, trusted-index enforcement, or upper version constraint.
Python packages can execute code during installation and whenever imported. A compromised future release, package-index compromise, or malicious package supplied through an untrusted configured index could therefore introduce code that was not present during this audit. The fallback installation path is also entirely unpinned.
This does not establish that any currently named package is malicious. The issue is that the effective dependency set can change after review without integrity validation.
Attack Path
- An attacker compromises a future release of one of the listed dependencies, compromises the package index, or controls a package index configured in the victim's pip environment.
- The victim follows the documented setup process and runs
scripts/setup.sh. pip3resolves the open-ended requirement to the attacker-controlled release.- Malicious code executes during package installation or when the installed module is imported by the conversion scripts.
...[truncated 729 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct and transitive dependency to an exact reviewed version.
- Generate a lock file using a dependency-management tool such as
pip-tools, Poetry, or uv. - Record and enforce package hashes, for example by using
pip install --require-hashes. - Apply the same exact version constraints to the fallback installation branch, or remove that branch.
- Install dependencies in a dedicated virtual environment rather than the global Python environment.
- Explicitly configure a trusted package index and prevent unexpected pip configuration from redirecting dependency resolution.
- Add automated dependency scanning and controlled update review before changing locked versions.
- Pin or otherwise control the Pandoc package version installed through operating-system package managers where reproducibility is required.
