Back to skill

Security audit

Twitter Autopilot

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Twitter/X automation skill with real account impact, but its sensitive behavior is mostly purpose-aligned and visible to the user.

Install only for an account where you are comfortable giving an agent read/write Twitter/X authority. Keep `MODE.md` in DRAFT for new or sensitive accounts, review queue entries before running `queue`, avoid cron posting until you trust the workflow, and consider pinning Tweepy in a virtual environment.

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

Warning
Location
SKILL.md:58
Finding
Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 24 and 58-61 **Vulnerability Type**: Unpinned dependency installation without integrity verification **Risk Level**: Medium ### Vulnerable Code ```markdown ### Dependencies - `tweepy` (pip install) ``` ```markdown ### 3. Install Dependency ```bash pip install tweepy ``` ``` ### Technical Analysis The setup instructions install `tweepy` from the configured Python package index without specifying an audited version, using a lockfile, or verifying cryptographic hashes. Consequently, the reviewed project does not uniquely determine which package and transitive dependency versions users will execute. Package installation and subsequent import can execute third-party code with the privileges of the user running the Skill. The script imports this dependency at `scripts/tweet.py:8`, and it later operates in a process containing Twitter OAuth credentials. A compromised package release, compromised package-index account, unsafe transitive dependency, or unexpectedly changed future release could therefore introduce arbitrary behavior outside the audited code. No evidence indicates that the currently published `tweepy` package is malicious. The issue is the mutable and unverifiable dependency-resolution process prescribed by the project. ### Attack Path 1. An attacker compromises the upstream package, one of its transitive dependencies, or the relevant package-index publishing account. 2. The attacker publishes a malicious release that satisfies the unrestricted package name `tweepy`. 3. A user follows the documented setup command: `pip install tweepy`. 4. `pip` resolves and installs the attacker-controlled or compromised release because no version or hash is enforced. 5. The user invokes `scripts/tweet.py`, which imports `tweepy`. 6. Malicious dependency code executes in the Twitter automation process and may access its environment, filesystem permissions, and network connectivity. ### Im ...[truncated 591 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `tweepy` and every transitive dependency to versions that have been reviewed and tested. 2. Store dependencies in a lockfile or hash-locked requirements file. 3. Require hash verification during installation, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Generate `requirements.txt` with exact versions and SHA-256 hashes using a dependency-locking tool such as `pip-tools`. 5. Install dependencies inside a dedicated virtual environment rather than the system Python environment. 6. Review and update pinned dependencies through a controlled process that includes vulnerability scanning and regression testing. 7. Avoid making Twitter credentials available during package installation. Supply them only when the audited application is executed. 8. Where feasible, restrict the runtime process’s filesystem access, network access, and operating-system privileges. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
The documented behavior does not fully match the actions exposed by the skill, including destructive operations like tweet deletion and additional read capabilities. Description-behavior mismatches are dangerous because reviewers may authorize the skill for benign posting while overlooking higher-risk capabilities that can damage an account or leak information.

Credential Access

High
Category
Privilege Escalation
Content
### 1. Get API Keys
1. Go to [developer.x.com](https://developer.x.com) → create a project + app
2. Set app permissions to **Read and Write**
3. Generate: API Key, API Secret, Access Token, Access Token Secret
4. Generate Bearer Token: `curl -u "API_KEY:API_SECRET" -d "grant_type=client_credentials" "https://api.twitter.com/oauth2/token"`

### 2. Set Environment Variables
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill requests or implies access to environment secrets and writable files, and can perform real-world posting actions, but it does not declare an explicit tool/permission scope. That makes the skill harder to sandbox and review, increasing the chance that an agent can access credentials or modify files beyond what operators expect.

External Transmission

Medium
Category
Data Exfiltration
Content
1. Go to [developer.x.com](https://developer.x.com) → create a project + app
2. Set app permissions to **Read and Write**
3. Generate: API Key, API Secret, Access Token, Access Token Secret
4. Generate Bearer Token: `curl -u "API_KEY:API_SECRET" -d "grant_type=client_credentials" "https://api.twitter.com/oauth2/token"`

### 2. Set Environment Variables
```bash
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
1. Go to [developer.x.com](https://developer.x.com) → create a project + app
2. Set app permissions to **Read and Write**
3. Generate: API Key, API Secret, Access Token, Access Token Secret
4. Generate Bearer Token: `curl -u "API_KEY:API_SECRET" -d "grant_type=client_credentials" "https://api.twitter.com/oauth2/token"`

### 2. Set Environment Variables
```bash
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
### Auto Mode (for established accounts)
Agent posts directly. Use guardrails:
- No controversial topics without approval
- No tagging accounts with >100k followers without approval
- Keep a log of everything posted
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
### Auto Mode (for established accounts)
Agent posts directly. Use guardrails:
- No controversial topics without approval
- No tagging accounts with >100k followers without approval
- Keep a log of everything posted
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The delete command immediately deletes a tweet by ID without any confirmation or safeguard. In an automation context, a bad argument, model error, or malicious instruction could irreversibly remove legitimate content and cause operational or reputational damage.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The queue command will automatically publish the first unchecked item in twitter/queue.md with no confirmation, dry-run, or mode enforcement. In a Twitter automation skill, this is materially risky because any upstream agent mistake, prompt injection into the queue file, or accidental draft entry can become a public post immediately.

Static analysis

No suspicious patterns detected.