T08 · Insecure Dependencies
- Location
SKILL.md:213- Finding
Unpinned Third-Party Dependencies in OCR Installation Guidance
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:213-216
Vulnerability Type: Unpinned third-party package installation
Risk Level: Lowpython ### Extract Text from Scanned PDFs ```python # Requires: pip install pytesseract pdf2image import pytesseractTechnical Analysis
The documentation instructs users or agents to install
pytesseractandpdf2imagewithout specifying exact versions or verifying package hashes. Consequently, the code retrieved at installation time can differ from the code reviewed during this audit.The package names correspond to established projects, and the project does not use an explicitly untrusted package index or demonstrate dependency confusion. Therefore, this is a supply-chain hardening issue rather than evidence that the dependencies are currently malicious. Exploitation would require compromise of a package, maintainer account, package repository, dependency resolution path, or configured Python package index.
Attack Path
- An attacker compromises a referenced package release, one of its dependencies, a maintainer account, or the package index used by the environment.
- The attacker publishes a malicious version that satisfies the unconstrained installation command.
- A user or agent follows
SKILL.mdand runspip install pytesseract pdf2image. pipresolves and installs the attacker-controlled release.- Malicious package behavior may execute during installation or when the package is imported by the OCR workflow.
Impact Assessment
A compromised dependency could execute code with the privileges of the user running
pipor the PDF-processing workflow. Potential effects include reading or modifying files accessible to that account, accessing PDF contents and environment variables, altering generated documents, and making network connections where the runtime permits them.The project itself contains no demonstrated network retrieval, p ...[truncated 215 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin reviewed versions, for example through a version-controlled requirements file using exact
==constraints. - Generate and verify cryptographic hashes with a hash-locked dependency workflow, such as
pip install --require-hashes -r requirements.txt. - Lock transitive dependencies so indirect package updates cannot enter the environment without review.
- Install dependencies in an isolated virtual environment under a non-privileged account.
- Use a trusted, explicitly configured package index or an internally controlled package mirror.
- Add automated dependency vulnerability and provenance scanning to the release process.
- Periodically update pins through a reviewed process rather than allowing unconstrained installation at runtime.
- Pin reviewed versions, for example through a version-controlled requirements file using exact
