T08 · Insecure Dependencies
Warning
- Location
- requirements.txt:1
- Finding
- Unpinned Third-Party Dependencies Permit Unreviewed Supply-Chain Updates<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-6`; installation instructions at `SKILL.md:24-28` **Vulnerability Type**: Unpinned third-party dependencies and browser artifacts **Risk Level**: Medium ### Vulnerable Code `requirements.txt:1-6`: ```text scrapling>=0.4.2 curl_cffi>=0.14.0 playwright>=1.58.0 patchright>=1.58.2 msgspec>=0.20.0 browserforge>=1.2.4 ``` `SKILL.md:24-28`: ```bash To install dependencies: ```bash pip install -r requirements.txt playwright install # Required for browser automation. If slow, consider downloading manually. ``` ``` ### Technical Analysis Every Python dependency uses an open-ended minimum-version constraint. Consequently, `pip install -r requirements.txt` may install future releases that were not available or reviewed when this Skill was audited. The dependency graph is also not locked, so compatible transitive dependencies can change independently. The separate `playwright install` command downloads executable browser artifacts without documenting a pinned browser revision, integrity verification process, or trusted artifact policy. While downloading dependencies is necessary to install the declared search functionality, allowing versions and executable artifacts to vary exceeds the minimum reproducibility needed for that functionality. This is a supply-chain weakness rather than evidence that the currently named packages are malicious. Exploitation requires compromise of a package, maintainer account, distribution channel, dependency resolution path, or downloaded browser artifact. ### Attack Path 1. An attacker compromises the release process or distribution account of a listed direct dependency, one of its transitive dependencies, or a browser artifact source. 2. The attacker publishes a malicious version satisfying the open-ended constraints, such as a version newer than `scrapling 0.4.2`. 3. A user follows `SKILL.md` and executes `pip install -r requirements.txt` or `playwright in ...[truncated 1023 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace open-ended constraints with exact versions that have been reviewed and tested, for example `package==x.y.z`. 2. Generate and commit a dependency lock file covering direct and transitive dependencies. 3. Require package hashes during installation, such as a hash-locked requirements file used with `pip install --require-hashes`. 4. Review dependency provenance, release signatures, maintainers, and vulnerability advisories before accepting updates. 5. Pin the Playwright package and corresponding browser revision. Verify downloaded browser artifacts through supported checksums, signatures, or an internally controlled artifact repository. 6. Install dependencies in an isolated virtual environment or container under an unprivileged account. Do not run installation commands as root or administrator. 7. Route dependency upgrades through an explicit review and testing process rather than accepting newly published compatible releases automatically. 8. Consider using a trusted internal package mirror and denying unexpected package indexes to reduce dependency-confusion and repository-compromise exposure. ]]>
