T08 · Insecure Dependencies
Warning
- Location
- requirements.txt:1
- Finding
- Unpinned dependencies and unsafe system-wide installation guidance<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-3`; installation guidance in `SKILL.md:19-21` and `README.md:73-75` **Vulnerability Type**: Unbounded dependency resolution and system environment modification **Risk Level**: Medium ### Vulnerable Code `requirements.txt:1-3`: ```text pyobjc-framework-Vision>=12.0 pyautogui>=0.9 Pillow>=10.0 ``` `SKILL.md:19-21`: ```bash pip3 install --break-system-packages -r {baseDir}/requirements.txt ``` `README.md:73-75`: ```bash pip3 install --break-system-packages -r requirements.txt ``` ### Technical Analysis All three third-party dependencies use open-ended lower-bound constraints. Consequently, an installation can retrieve package versions that did not exist when the Skill was reviewed. The project provides neither a lock file nor cryptographic hashes that bind installation to reviewed artifacts. The primary installation guidance also uses `--break-system-packages`, which bypasses Python's externally managed environment protection. This can modify a shared Homebrew or system-level Python environment instead of isolating the Skill's dependencies. Python packages may execute build-backend or setup-related code during installation, and their modules execute code when imported. The Skill imports these dependencies immediately in `scripts/mac_use.py`, including `pyautogui`, `Vision`, `Quartz`, and Pillow modules. A compromised or malicious future package release could therefore execute with the privileges of the user running the installation or Skill. This finding does not establish that the currently named packages are malicious. The vulnerability is the absence of version and artifact integrity controls combined with guidance to alter a shared Python environment. ### Attack Path 1. An attacker compromises the release process or distribution account of one of the declared dependencies, or publishes a future release containing malicious installation or import behavior. 2. A user follows ...[truncated 1284 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an exact, reviewed version rather than using open-ended `>=` constraints. 2. Generate and commit a lock file that includes transitive dependencies. 3. Require cryptographic hashes for downloaded artifacts, for example through a hash-locked requirements file and `pip install --require-hashes`. 4. Review dependency updates before changing the lock file, including package ownership, release history, source distribution behavior, and published wheels. 5. Make an isolated virtual environment the default installation procedure: ```bash python3 -m venv .venv source .venv/bin/activate python -m pip install --require-hashes -r requirements.lock ``` 6. Remove `--break-system-packages` from the recommended setup. If retained as a non-default alternative, clearly warn that it modifies a shared Python environment. 7. Consider automated dependency vulnerability scanning and reproducible builds as part of release validation. ]]>
