T08 · Insecure Dependencies
- Location
install.sh:36- Finding
Unpinned Third-Party Packages and Automatically Downloaded Chromium Binary
- Content
View full analysis
/dev/null || echo "Chromium download failed; it will be downloaded during the first image generation" ``` ### Technical Analysis The installation script downloads `matplotlib` and `pyppeteer` without pinning versions or verifying package hashes. The exact package code installed therefore depends on the package-index state at installation time rather than on a reproducible, audited dependency set. The script also invokes pyppeteer's downloader to obtain a Chromium executable. The project does not independently pin the expected browser artifact or verify it against a project-maintained cryptographic checksum. Python package installation may execute package build or installation logic. Consequently, compromise of a package release, transitive dependency, configured Python package index, or browser distribution channel could cause attacker-controlled code to execute on the host. The use of `--user` limits the Python installation to the invoking user's environment, but it does not prevent code execution with that user's privileges. ### Attack Path 1. An attacker compromises an upstream dependency release, transitive dependency, package-index response, or browser artifact distribution channel. 2. The user follows the documented installation process and runs `bash install.sh`. 3. `pip3` resolves the unpinned pack ...[truncated 1068 chars]- Remediation
View remediation
pyppeteer== ``` 2. Generate a lock file that includes all transitive dependencies. 3. Require hashes during installation, for example: ```bash python3 -m pip install --require-hashes -r requirements.lock ``` 4. Install dependencies inside a dedicated virtual environment instead of the user's global package environment. 5. Pin the expected Chromium revision and verify the downloaded artifact against a trusted SHA-256 digest before execution. 6. Prefer a browser supplied by a trusted operating-system repository where security updates and package signatures are managed centrally. 7. Separate optional system-font installation from Python dependency setup so the normal installation path does not request `sudo`. 8. Document the expected package index and reject unexpected mirrors or externally configured indexes where feasible. ]]>
