T08 · Insecure Dependencies
Warning
- Location
- install.sh:40
- Finding
- Mutable and Unverified Playwright Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `install.sh:40-41`; `requirements.txt:1` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium ### Vulnerable Code `install.sh:40-41`: ```bash pip install --upgrade pip pip install playwright ``` `requirements.txt:1`: ```text playwright>=1.40.0 ``` ### Technical Analysis The installation process retrieves executable Python packages without exact version pins, cryptographic hashes, or a reviewed lockfile. The lower-bound constraint in `requirements.txt` permits any newer Playwright release, while `install.sh` ignores the requirements file and installs whatever version is current at installation time. Python packages can execute code during build and installation. Consequently, installation behavior can change after the skill has been reviewed. This is a supply-chain weakness rather than evidence that the current Playwright package is malicious. The README also recommends mutable installation commands such as `pip install playwright` and `npx playwright install chromium`. No Node.js package manifest or lockfile is present in the audited project, so the documented Node.js installation path is not reproducible. ### Attack Path 1. An attacker compromises an allowed package release, distribution account, registry response, or transitive dependency. 2. A user executes `install.sh` or follows the documented manual installation procedure. 3. `pip` resolves the mutable requirement to the compromised or unexpectedly changed release. 4. Package build or installation code runs with the privileges of the user executing the installer. 5. The hostile package can access files, environment variables, network resources, and credentials available to that user. ### Impact Assessment Successful exploitation can execute arbitrary code with the installer user's privileges. If installation is performed by a privileged account or inside a sensitive agent workspace, the affected scope may include projec ...[truncated 167 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin Playwright and every transitive dependency to reviewed exact versions. 2. Generate a hash-locked requirements file, for example with `pip-compile --generate-hashes`. 3. Install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Do not upgrade `pip` implicitly during ordinary skill installation; manage installer tooling through a separately reviewed process. 5. Add and commit a reviewed `package.json` and lockfile if Node.js support is retained. 6. Use `npm ci` instead of mutable `npm install`, and avoid executing unpinned packages through `npx`. 7. Run dependency installation as an unprivileged user in an isolated environment. ]]>
