T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Third-Party Dependency Exposes Authentication Tokens to Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1,setup.py:33-35,references/INSTALLATION.md:18-21
Vulnerability Type: Unpinned third-party dependency
Risk Level: MediumVulnerable code in
requirements.txt:1:text tweeterpyVulnerable code in
setup.py:33-35:python install_requires=[ "tweeterpy", ],Installation command in
references/INSTALLATION.md:18-21:bash ### Step 2: Install Dependencies ```bash pip install -r requirements.txttext ### Technical Analysis The project installs `tweeterpy` without an exact version constraint, lock file, or package integrity hash. Consequently, installation resolves to whichever release is available from the configured Python package index at that time. TweeterPy operates within the same Python process and receives the user's Twitter/X authentication token through `generate_session(auth_token=auth_token)`. Dependency code therefore has the same local privileges as the Skill and legitimate access to the supplied token and session state. This does not establish that the current TweeterPy package is malicious. The vulnerability is that the reviewed Skill does not constrain the dependency to a specific, audited artifact. A compromised publisher account, malicious future release, package-index compromise, or hostile package served by a substituted index could change the effective code after this audit. ### Attack Path 1. An attacker compromises the upstream package, its publisher account, or the package source used by the victim. 2. The attacker publishes or serves a modified `tweeterpy` release. 3. A user follows the documented `pip install -r requirements.txt` or package installation procedure. 4. Pip resolves and installs the attacker-controlled release because no version or hash is enforced. 5. The user initializes `TwitterSkillInterface` with an authentication token. 6. The Skill passes t ...[truncated 830 chars]- Remediation
View remediation
Remediation Suggestions
- Pin TweeterPy to an exact, reviewed version in both dependency manifests:
text tweeterpy==<reviewed-version> - Generate a lock file that also constrains all transitive dependencies.
- Record and enforce package hashes:
bash pip install --require-hashes -r requirements.txt - Keep
requirements.txtandsetup.pysynchronized so that neither installation path permits an unconstrained version. - Review release notes and source changes before updating the pinned version.
- Run the Skill in an isolated virtual environment or container with minimal file and network privileges.
- Avoid installing dependencies as root or another privileged account.
- Use a controlled package mirror and automated dependency vulnerability monitoring.
- Pin TweeterPy to an exact, reviewed version in both dependency manifests:
