T08 · Insecure Dependencies
- Location
requirements.txt:8- Finding
Unpinned Third-Party Dependencies Create a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:8-20
Vulnerability Type: Unpinned dependencies and non-reproducible package installation
Risk Level: MediumVulnerable Code
text python-markdown # Markdown file processing beautifulsoup4 # Extract text from HTML # CLI click==8.1.3 # Other tqdm==4.67.3 # Optional dependencies for OCR pytesseract; python_version >= "3.6" # OCR text recognition pdf2image; python_version >= "3.6" # Convert PDF files to images Pillow; python_version >= "3.6" # Image processingThe affected packages are:
python-markdownbeautifulsoup4pytesseractpdf2imagePillow
Technical Analysis
These dependencies have no exact version constraints or integrity hashes. Consequently, executing the installation procedure documented by the project can resolve to whichever compatible package release is available from the configured Python package index at installation time.
This prevents reproducible builds and means that the installed code can change after the Skill has been reviewed. If a package publisher account, package-index route, or configured mirror is compromised, a malicious or otherwise unsafe release could be selected automatically. Python packages may execute code during installation and subsequently when imported.
The project does not use
--require-hashes, a hash-locked requirements file, or another dependency lock mechanism to verify that retrieved artifacts are the versions reviewed by the project maintainers.Attack Path
- An attacker compromises the publication channel for one of the unpinned packages, or an untrusted package mirror serves a modified release.
- A user follows the installation instructions and runs
pip install -r requirements.txt. pipresolves the unpinned dependency to the attacker-controlled or otherwise unsafe release.- Package-controlled code executes during install ...[truncated 719 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a specifically reviewed version using exact
==constraints. - Generate and commit a fully resolved lock file that includes transitive dependencies.
- Record cryptographic hashes for all package artifacts and install with
pip --require-hashes. - Retrieve dependencies only from an approved HTTPS package index or controlled internal mirror.
- Run dependency vulnerability and provenance checks in CI before accepting lock-file changes.
- Separate optional OCR dependencies into an optional requirements file or package extra so they are installed only when OCR is required.
- Perform installations in an isolated virtual environment under a non-privileged account.
- Pin every direct dependency to a specifically reviewed version using exact
