T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:13
- Finding
- Unpinned and Unauditable Third-Party Executable Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 13–15 and 32–33 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```yaml pypi: xhs-surfer emoji: "\U0001F4D5" homepage: https://github.com/MTXAI/xhs_suffer ``` ```bash # pip installation pip install xhs-surfer playwright install chromium ``` ### Technical Analysis The Skill directs users to install `xhs-surfer` from PyPI without specifying an exact version or cryptographic hash. Consequently, the code installed by this command can change after the Skill has been reviewed. The project contains only `SKILL.md`; it does not include the dependency's implementation, a lockfile, hashes, or other material sufficient to audit the executable package. The documented GitHub repository name, `xhs_suffer`, also differs from the package and Skill name, `xhs-surfer`. This discrepancy does not prove malicious activity, but it reduces provenance clarity and makes it more difficult for users to verify that the package and repository belong to the same trusted release. The package is intended to operate in a sensitive context. Other documented examples provide it with Xiaohongshu authentication cookies, access to private-message functionality, browser automation capabilities, and an environment where LLM API keys may be present. Therefore, dependency integrity is security-critical. ### Attack Path 1. A user or agent follows `SKILL.md` and executes `pip install xhs-surfer`. 2. Pip resolves whichever package release is current because no version or hash is required. 3. An attacker compromises the publisher account or release process, or otherwise causes a malicious package version to be distributed under that dependency name. 4. The malicious dependency executes with the user's privileges during installation, import, or invocation. 5. During documented use, the dependency can receive the cookie file and co ...[truncated 1072 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `xhs-surfer` to a specific, reviewed version rather than installing the latest available release. 2. Use a requirements or lock file with cryptographic hashes, and install with hash verification, such as `pip install --require-hashes`. 3. Pin and verify Playwright and its browser artifacts through a reproducible dependency-management process. 4. Include the Skill's executable source in the reviewed project, or provide an immutable source reference such as a verified release tag and commit digest. 5. Clarify and verify the relationship between the `xhs-surfer` package and the `xhs_suffer` repository. Align naming where possible and document package ownership and release provenance. 6. Publish signed releases and verify signatures or attestations before installation. 7. Run browser automation in a sandbox or dedicated low-privilege account with access limited to the files and environment variables required for the task. 8. Avoid exposing unrelated API keys or credentials to the process. Use narrowly scoped credentials and rotate them if dependency compromise is suspected. 9. Validate the selected package artifact in CI through source review, malware scanning, and reproducible build or provenance checks before deployment.
