T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:20
- Finding
- Unpinned Tweepy Dependency Creates Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md:20-23` and `README.md:18` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium The Skill installs Tweepy without a version constraint or package-integrity verification. **Complete vulnerable code snippets:** `SKILL.md:20-23` ```yaml install: - id: tweepy kind: pip package: tweepy ``` `README.md:18` ```markdown 3. **Python 3** and `tweepy` (`pip3 install tweepy`) ``` ### Technical Analysis Both installation methods resolve whichever Tweepy release the configured Python package index currently considers appropriate. The project does not provide a reviewed version pin, lockfile, package hash, or index restriction. Consequently, the code installed at deployment time may differ from the dependency version originally reviewed. This is a supply-chain hardening weakness rather than evidence that the current Tweepy package is malicious. Exploitation would require compromise of the package, its maintainer account, the package index, or the dependency-resolution path. If that occurred, package installation or import-time code could execute under the same account as the OpenClaw Agent. The exposure is security-relevant because the scripts import Tweepy after Twitter credentials have been supplied through the environment. The dependency is also entrusted with OAuth credentials during client construction: ```python client = tweepy.Client( consumer_key=CONSUMER_KEY, consumer_secret=CONSUMER_SECRET, access_token=ACCESS_TOKEN, access_token_secret=ACCESS_TOKEN_SECRET, ) ``` ### Attack Path 1. An attacker compromises a future Tweepy distribution, its publishing account, the configured package index, or the dependency-resolution channel. 2. A user installs or reinstalls the Skill using the unpinned `tweepy` declaration or `pip3 install tweepy`. 3. The installer resolves and executes the compromised pac ...[truncated 1097 chars]
- Remediation
- ## Remediation Suggestions 1. Pin Tweepy to an explicitly reviewed version in both metadata and documentation, for example: ```yaml install: - id: tweepy kind: pip package: tweepy==REVIEWED_VERSION ``` 2. Generate a lockfile or requirements file containing cryptographic hashes and install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Pin and hash all transitive dependencies, not only Tweepy. 4. Use an approved package index or internal artifact mirror and require TLS certificate validation. 5. Run installation and execution as an unprivileged, isolated user. Avoid system-wide or privileged `pip` installation. 6. Restrict the Skill process to only the credentials and filesystem paths needed for Twitter operations. 7. Establish a dependency-update process that reviews release notes, source changes, provenance, and package hashes before updating the pinned version. 8. Keep the dependency declaration in `SKILL.md` and the command in `README.md` synchronized so users cannot bypass the pin by following manual instructions.
