T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned and Unnecessary PyPI Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 12–16
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable code snippet:
markdown 2. **Setup tesseract**: ``` exec pip install tesseract ``` Tesseract: `exec sudo apt update && sudo apt install tesseract-ocr`Technical Analysis
The setup instructions direct the agent to install the unpinned PyPI package
tesseractwithout a lockfile, package hash, exact version, or source verification. Python package installation can execute package-controlled build or installation logic. Consequently, the effective code installed by this instruction can change after the Skill has been reviewed.The project parser does not import or otherwise use this Python package. The separately installed operating-system package,
tesseract-ocr, provides the OCR executable required by the documented workflow. The PyPI installation therefore creates avoidable supply-chain exposure.This finding does not establish that the current
tesseractpackage is malicious. The vulnerability is the unsafe reliance on a mutable, unverified, and unnecessary dependency.Attack Path
- A user activates the Skill for receipt processing.
- The agent follows the documented setup workflow and executes
pip install tesseract. - The package installer resolves the mutable package name through its configured package index.
- If the package, one of its dependencies, the index, or the resolution configuration has been compromised, attacker-controlled build or installation code executes.
- That code runs with the privileges of the account invoking
pipand can access resources available to that account.
Impact Assessment
Successful exploitation could result in arbitrary code execution with the invoking user's privileges. This may permit access to that user's files, environment variables, application credentials ...[truncated 386 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
exec pip install tesseractbecause the project code does not use that Python package. - Install only the official
tesseract-ocroperating-system package from a trusted, configured distribution repository. - Avoid unattended privilege elevation. Ask the user to approve system package installation explicitly, or document Tesseract as a prerequisite.
- If a Python binding later becomes necessary, select the correct reviewed package and pin its exact version and cryptographic hashes in a lockfile or requirements file.
- Install Python dependencies in an isolated virtual environment under a non-privileged account.
- Use an approved internal package mirror or otherwise verify package provenance and dependency integrity before installation.
- Remove
