T08 · Insecure Dependencies
Warning
- Location
- scripts/requirements.txt:1
- Finding
- Unpinned Third-Party Dependencies Permit Unreviewed Package Updates## Vulnerability Details **File Location**: `scripts/requirements.txt`, lines 1-7 **Vulnerability Type**: Unpinned and unhashed third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```text numpy>=1.26 opencv-python>=4.10 openvino>=2025.0.0 nncf>=2.14.0 tqdm>=4.66 pyyaml>=6.0 ultralytics ``` The installation workflow is referenced in `SKILL.md`, lines 81-88: ```text - `setup_env.ps1`: create `.venv` and install Python dependencies. - `run_ultralytics_demo.ps1`: PowerShell wrapper for live, export, and benchmark modes. It exposes `-Model`, `-Precision`, `-Device`, OpenVINO performance hint, and async request controls. - `run_ultralytics_openvino_demo.py`: Ultralytics + OpenVINO implementation with runtime device and precision switching. - `run_downstream_demo.ps1`: PowerShell wrapper for person counting, object counting, and safety-zone alerts. - `run_downstream_demo.py`: downstream action layer on top of Ultralytics + OpenVINO detections. - `requirements.txt`: Python dependency list. - `demo_utils.py`: lightweight overlay helper. ``` ### Technical Analysis All declared dependencies allow versions that were not necessarily reviewed with this project. Six packages use open-ended minimum-version constraints, while `ultralytics` has no version constraint at all. The project also provides no lockfile or package hashes to authenticate the exact artifacts installed. Consequently, a fresh installation can resolve to dependency versions that differ from those used during development or audit. If an allowed upstream release or its distribution account is compromised, the resolver may install the compromised release without any change to this repository. Python package installation can execute package build hooks, and imported dependencies subsequently execute with the privileges of the user running the demonstration. No evidence indicates that the currently named packages are malicious. The vulnerability is the absence of controls ...[truncated 1523 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to an exact reviewed version, including `ultralytics`. 2. Generate a reproducible lockfile that includes all transitive dependencies. 3. Record cryptographic hashes for approved distribution artifacts and install with hash verification, such as `pip install --require-hashes`. 4. Resolve and build the lockfile from the official Python Package Index or another explicitly trusted internal mirror. 5. Prefer prebuilt wheels from trusted publishers and avoid source builds unless their build configuration has been reviewed. 6. Install dependencies inside an isolated virtual environment without administrative privileges. 7. Add automated dependency vulnerability and provenance scanning to the update process. 8. Review and test dependency updates before regenerating pins and hashes. 9. Where supported, verify package signatures or provenance attestations and retain a software bill of materials for released skill versions.
