Back to skill

Security audit

Twitter Intel

Security checks for vulnerabilities and agentic risk

Overview

This skill is transparent about its Twitter monitoring purpose, but it asks users to extract and reuse live browser session cookies with unpinned external code, which creates account-compromise risk.

Review this carefully before installing. Use a dedicated low-risk Twitter/X account if possible, keep the cookie file outside the project with restrictive permissions, never commit or share it, and revoke sessions if it may have been exposed. Prefer an official OAuth/API flow or a pinned, reviewed dependency set before using this for ongoing monitoring.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Error
Location
SKILL.md:33
Finding
Unpinned External Dependencies Handle Reusable Twitter Authentication Cookies<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 33–40 and 55–62 **Vulnerability Type**: Unpinned and externally sourced dependency with access to authentication credentials **Risk Level**: High ### Complete Code Snippet ```bash # Install rnet (Rust HTTP client with TLS fingerprint emulation) pip install "rnet>=3.0.0rc20" --pre # Required files: # 1. rnet_twitter.py — lightweight async Twitter GraphQL client # Get it: https://github.com/PHY041/rnet-twitter-client # 2. twitter_cookies.json — your auth cookies # Format: [{"name": "auth_token", "value": "..."}, {"name": "ct0", "value": "..."}] ``` ```python import asyncio, os from rnet_twitter import RnetTwitterClient async def search(query, count=200): client = RnetTwitterClient() cookies_path = os.environ.get("TWITTER_COOKIES_PATH", "twitter_cookies.json") client.load_cookies(cookies_path) tweets = await client.search_tweets(query, count=count, product="Top") return tweets ``` ### Technical Analysis The Skill directs users to install a pre-release dependency through the open-ended constraint `rnet>=3.0.0rc20` and to obtain `rnet_twitter.py` from an external GitHub repository without specifying an immutable commit, release artifact, checksum, or signature. This externally obtained code is imported into the Python process and receives direct access to a cookie file containing reusable Twitter session credentials, including `auth_token` and `ct0`. Python imports execute module-level code immediately, so a compromised or unexpectedly modified dependency would not need to wait for `load_cookies()` to misuse local privileges. The absence of dependency locking and integrity verification means the code executed during a future installation can differ from the code reviewed today. This is a supply-chain weakness; the available evidence does not establish that the named package or repository is currently malicious. ### Attack Path 1. An attacker compromises the pa ...[truncated 1460 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every Python dependency to an exact, reviewed version rather than using an open-ended pre-release constraint. 2. Use a lock file with cryptographic hashes and require hash verification during installation, such as `pip install --require-hashes`. 3. Pin the GitHub client to a reviewed immutable commit and verify the downloaded artifact against a documented SHA-256 digest or trusted signature. 4. Prefer vendoring the minimal reviewed client implementation into the Skill package when licensing permits, followed by routine security review and controlled updates. 5. Audit direct and transitive dependencies before deployment and use automated dependency vulnerability and provenance scanning. 6. Run the client in a sandbox or dedicated low-privilege environment with access only to the required cookie file and network destinations. 7. Use a dedicated Twitter account with the minimum necessary privileges. Revoke its active sessions immediately if dependency compromise is suspected. 8. Restrict cookie-file permissions to the Agent's operating-system account, avoid defaulting to a predictable working-directory file, and prevent credentials from appearing in logs or persisted reports. 9. Establish an explicit update process in which new dependency versions and repository commits are reviewed and tested before being accepted. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Content
s

```bash
# Install rnet (Rust HTTP client with TLS fingerprint emulation)
pip install "rnet>=3.0.0rc20" --pre

# Required files:
# 1. rnet_twitter.py — lightweight async Twitter GraphQL client
#    Get it: https://github.com/PHY041/rnet-twitter-client
# 2. twitter_cookies.json — your auth cookies
#    Format: [{"name": "auth_token", "value": "..."}, {"name": "ct0", "value": "..."}]
#    Get cookies: Chrome DevTools → Application → Cookies → x.com
#    Cookies expire ~2 weeks. Refresh when you get 403 errors.
```

Set `TWITTER_COOKIES_PATH` env var to your cookies file location.

---

## Phase 1: On-demand Search

When user says "search [keyword] on twitter", "twitter intel [topic]", "find tweets about [X]":

### Step 1 — Run Search

```python
import asyncio, os
from rnet_twitter import RnetTwitterClient

async def search(query, count=200):
    client = RnetTwitterClient()
    cookies_path = os.environ.get("TWITTER_COOKIES_PATH", "twitter_cookies.json")
    client.load_coo
Confidence
94% confidence
Finding
The info-stealer match is contextually credible here because the skill directs the user to manually obtain browser cookies from Chrome DevTools and use them as authentication material. Even though it does not automate theft, it normalizes extraction and reuse of session tokens outside the browser, which materially increases the risk of credential leakage, misuse, and account compromise.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill explicitly instructs users to extract and store live Twitter authentication cookies (`auth_token`, `ct0`) from their browser and reuse them from a local file. Those cookies are sensitive session credentials; mishandling them can enable account/session hijacking and unauthorized access, and the skill provides no warning about secure storage, least-privilege handling, or privacy/legal implications.

Missing User Warnings

Low
Confidence
87% confidence
Finding
The monitoring workflow persists collected tweet data to daily files and sends notifications, but it does not define retention limits, access controls, minimization, or privacy disclosures. Long-term storage and alerting can amplify privacy, compliance, and operational risk, especially if tweet contents, author metadata, or sensitive queries are retained indefinitely or exposed to unintended recipients.

Static analysis

No suspicious patterns detected.