T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:149
- Finding
- Unpinned Runtime Packages and Browser Components Permit Supply-Chain Code Execution## Vulnerability Details **File Location**: `SKILL.md:149`; `README.md:104-106`; `scripts/_cpbl_api.py:4-6`; `scripts/cpbl_games.py:4-6`; `scripts/cpbl_live.py:4-7`; `scripts/cpbl_schedule.py:4-6`; `scripts/cpbl_standings.py:4-7`; `scripts/cpbl_stats.py:4-7`; `scripts/cpbl_twbsball.py:4-6` **Vulnerability Type**: Unpinned third-party runtime and browser dependencies **Risk Level**: Medium ### Vulnerable Code `SKILL.md:149`: ```bash cd skills/cpbl && uv run --with "scrapling[ai]" --with curl_cffi patchright install ``` `README.md:104-106`: ```bash cd skills/cpbl && uv venv && uv pip install -e . .venv/bin/scrapling install --force ``` Representative PEP 723 dependency declaration from `scripts/_cpbl_api.py:4-6`: ```python # dependencies = [ # "scrapling[ai]", # ] ``` The same unpinned `scrapling[ai]` declaration is present in the other listed scripts. `beautifulsoup4` is also declared without a version constraint in `scripts/cpbl_standings.py` and `scripts/cpbl_stats.py`. ### Technical Analysis The scripts use `uv run` with PEP 723 dependency declarations that do not pin exact versions or verify package hashes. The documented setup procedure also invokes package-managed browser installation, including a forced installation command, without pinning or validating the downloaded browser revision. Consequently, the code that actually runs can change after this Skill has been reviewed. Package resolution may retrieve a later release of `scrapling`, `curl_cffi`, `patchright`, `beautifulsoup4`, or their transitive dependencies. Installation hooks, imported package initialization code, and browser installers execute with the permissions of the user running the Skill. The audit found no evidence that the currently referenced packages or current project code are malicious. The issue is the absence of controls that bind execution to reviewed dependency artifacts. ### Attack Path 1. ...[truncated 1519 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to an exact reviewed version, including all PEP 723 declarations. 2. Generate and commit a lockfile that records the complete transitive dependency graph. 3. Require cryptographic hashes for downloaded Python distributions where supported. 4. Pin the browser engine and browser revision rather than installing whichever version is current. 5. Remove `--force` from normal installation instructions so existing reviewed components are not silently replaced. 6. Restrict package resolution to explicitly trusted registries and disable untrusted supplemental indexes. 7. Separate dependency and browser installation from routine Skill execution. Require explicit user approval before downloading executable components. 8. Run installation and browser automation inside a sandbox with restricted filesystem access, environment-variable access, and outbound networking. 9. Add automated dependency review, provenance verification, and vulnerability scanning to the release process. 10. Keep dependency versions consistent across all scripts so independent `uv run` resolutions cannot produce different runtime environments.
