Back to skill

Security audit

X Twitter

Security checks for vulnerabilities and agentic risk

Overview

This X/Twitter skill is purpose-aligned, but it can use stored account credentials to make public account changes without explicit confirmation guardrails.

Install only if you are comfortable letting an agent use your X/Twitter account credentials for public actions. Use a dedicated X Developer app with the minimum Read and Write permissions, do not grant DM permissions unless truly needed, protect the credentials file, and require explicit confirmation before posts, deletes, follows, retweets, bookmarks, or list changes. Be aware that media upload uses upload.twitter.com in addition to api.twitter.com, and the package metadata slug does not match the skill name exactly.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (30)

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

The skill explicitly requires reading long-lived API and access credentials from a local file in order to act on the user's X/Twitter account. Credential access is necessary for functionality, but it is still security-sensitive because compromise or misuse of the skill enables account actions, impersonation, and abuse of the developer app.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: x-twitter
description: "X/Twitter manager: post, reply, search, like, retweet & get analytics. Requires: powershell/pwsh. Reads ~/.config/x-twitter/credentials.json (X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_SECRET). App credentials permanent; account tokens rotate periodically and immediately if host is compromised. Grant minimal permissions only. No data forwarded; all calls go to api.twitter.com only."
metadata: {"openclaw":{"emoji":"[x]","requires":{"anyBins":["powershell","pwsh"]}}}
---

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The skill instructs direct loading of API secrets and access tokens from disk at runtime. Although expected for authentication, this creates a concentrated secret-handling point where any malicious modification of the skill or host compromise could leverage those credentials for unauthorized account operations.

Content

Scanner excerpt · SKILL.md (reported line 22)May include surrounding context.

STEP 1 - Load Credentials

Credentials are stored in ~/.config/x-twitter/credentials.json.

powershell
$cfg           = Get-Content "$HOME/.config/x-twitter/credentials.json" -Raw | ConvertFrom-Json

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

The code extracts all four sensitive credentials into variables, enabling full authenticated API access under the user's account and app context. In this skill context the behavior is functional, but the impact of misuse is high because the tokens allow posting, deleting, follows, bookmarks, and other account actions.

Content

Scanner excerpt · SKILL.md (reported line 25)May include surrounding context.

Credentials are stored in ~/.config/x-twitter/credentials.json.

powershell
$cfg           = Get-Content "$HOME/.config/x-twitter/credentials.json" -Raw | ConvertFrom-Json
$apiKey        = $cfg.X_API_KEY
$apiSecret     = $cfg.X_API_SECRET
$accessToken   = $cfg.X_ACCESS_TOKEN

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 38)May include surrounding context.

md
|---|---|
| `X_API_KEY` | App API Key (Consumer Key) - from X Developer Portal |
| `X_API_SECRET` | App API Secret (Consumer Secret) - from X Developer Portal |
| `X_ACCESS_TOKEN` | Account Access Token - from X Developer Portal |
| `X_ACCESS_SECRET` | Account Access Token Secret - from X Developer Portal |

**One-time setup:**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

md
|---|---|
| `X_API_KEY` | App API Key (Consumer Key) - from X Developer Portal |
| `X_API_SECRET` | App API Secret (Consumer Secret) - from X Developer Portal |
| `X_ACCESS_TOKEN` | Account Access Token - from X Developer Portal |
| `X_ACCESS_SECRET` | Account Access Token Secret - from X Developer Portal |

**One-time setup:**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 45)May include surrounding context.

md
|---|---|
| `X_API_KEY` | App API Key (Consumer Key) - from X Developer Portal |
| `X_API_SECRET` | App API Secret (Consumer Secret) - from X Developer Portal |
| `X_ACCESS_TOKEN` | Account Access Token - from X Developer Portal |
| `X_ACCESS_SECRET` | Account Access Token Secret - from X Developer Portal |

**One-time setup:**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 229)May include surrounding context.

md
|---|---|
| `X_API_KEY` | App API Key (Consumer Key) - from X Developer Portal |
| `X_API_SECRET` | App API Secret (Consumer Secret) - from X Developer Portal |
| `X_ACCESS_TOKEN` | Account Access Token - from X Developer Portal |
| `X_ACCESS_SECRET` | Account Access Token Secret - from X Developer Portal |

**One-time setup:**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 264)May include surrounding context.

md
|---|---|
| `X_API_KEY` | App API Key (Consumer Key) - from X Developer Portal |
| `X_API_SECRET` | App API Secret (Consumer Secret) - from X Developer Portal |
| `X_ACCESS_TOKEN` | Account Access Token - from X Developer Portal |
| `X_ACCESS_SECRET` | Account Access Token Secret - from X Developer Portal |

**One-time setup:**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · _meta.json (reported line 42)May include surrounding context.

json
|---|---|
| `X_API_KEY` | App API Key (Consumer Key) - from X Developer Portal |
| `X_API_SECRET` | App API Secret (Consumer Secret) - from X Developer Portal |
| `X_ACCESS_TOKEN` | Account Access Token - from X Developer Portal |
| `X_ACCESS_SECRET` | Account Access Token Secret - from X Developer Portal |

**One-time setup:**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · _meta.json (reported line 46)May include surrounding context.

json
|---|---|
| `X_API_KEY` | App API Key (Consumer Key) - from X Developer Portal |
| `X_API_SECRET` | App API Secret (Consumer Secret) - from X Developer Portal |
| `X_ACCESS_TOKEN` | Account Access Token - from X Developer Portal |
| `X_ACCESS_SECRET` | Account Access Token Secret - from X Developer Portal |

**One-time setup:**

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The setup instructions write long-lived secrets to a plaintext JSON file under the home directory. Even with permission guidance, plaintext-at-rest credentials materially increase the consequences of local compromise, accidental backup leakage, or overly broad file access.

Content

Scanner excerpt · SKILL.md (reported line 54)May include surrounding context.

X_API_SECRET = "your_api_secret" X_ACCESS_TOKEN = "your_access_token" X_ACCESS_SECRET = "your_access_token_secret" } | ConvertTo-Json | Set-Content "$HOME/.config/x-twitter/credentials.json" -Encoding UTF8

text

**Restrict file permissions immediately after saving:**

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
87% confidence
Finding

The skill includes destructive and state-changing operations such as DELETE /tweets and various follow/bookmark/list actions constructed directly from user intent, but it does not require explicit confirmation or guardrails for these actions. In an agent setting, this creates a real risk of accidental, coerced, or prompt-injected misuse of account-affecting operations.

Content

Scanner excerpt · SKILL.md (reported line 241)May include surrounding context.

md
| Action | Limit |
|---|---|
| POST /tweets | 17 tweets per 24h per user; 50 per app |
| DELETE /tweets | 50 per 15 min |
| GET /users/me | 25 per 24h |
| GET /tweets/search/recent | Requires Basic tier or above |
| GET timelines | 5 per 15 min (Free); 180 per 15 min (Basic) |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 60)May include surrounding context.

md
"publishedAt":  "2026-03-01T08:51:19Z",
    "ownerId":  "kn7824yf4srh3akes6axhmqf5n81q7dh",
    "requiredConfigPaths":  [
                                "~/.config/x-twitter/credentials.json"
                            ],
    "requiredEnvVars":  [

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 62)May include surrounding context.

md
"publishedAt":  "2026-03-01T08:51:19Z",
    "ownerId":  "kn7824yf4srh3akes6axhmqf5n81q7dh",
    "requiredConfigPaths":  [
                                "~/.config/x-twitter/credentials.json"
                            ],
    "requiredEnvVars":  [

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · _meta.json (reported line 18)May include surrounding context.

json
"publishedAt":  "2026-03-01T08:51:19Z",
    "ownerId":  "kn7824yf4srh3akes6axhmqf5n81q7dh",
    "requiredConfigPaths":  [
                                "~/.config/x-twitter/credentials.json"
                            ],
    "requiredEnvVars":  [

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · _meta.json (reported line 33)May include surrounding context.

json
"publishedAt":  "2026-03-01T08:51:19Z",
    "ownerId":  "kn7824yf4srh3akes6axhmqf5n81q7dh",
    "requiredConfigPaths":  [
                                "~/.config/x-twitter/credentials.json"
                            ],
    "requiredEnvVars":  [

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · _meta.json (reported line 46)May include surrounding context.

json
"publishedAt":  "2026-03-01T08:51:19Z",
    "ownerId":  "kn7824yf4srh3akes6axhmqf5n81q7dh",
    "requiredConfigPaths":  [
                                "~/.config/x-twitter/credentials.json"
                            ],
    "requiredEnvVars":  [

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest claims all calls go only to api.twitter.com, but the skill also instructs use of upload.twitter.com for media upload. Even though both domains belong to X/Twitter, inaccurate network-destination disclosure weakens transparency and can defeat network allowlist or review decisions based on the manifest.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 12)May include surrounding context.

md
Constructs and executes X API v2 calls inline based on what the user wants. No scripts needed.

API version: **v2**
Base URL: `https://api.twitter.com/2`

> **Requires an X Developer App** with OAuth 1.0a User Context credentials.
> Free tier supports posting, reading own timeline, and basic lookups.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 151)May include surrounding context.

md
Constructs and executes X API v2 calls inline based on what the user wants. No scripts needed.

API version: **v2**
Base URL: `https://api.twitter.com/2`

> **Requires an X Developer App** with OAuth 1.0a User Context credentials.
> Free tier supports posting, reading own timeline, and basic lookups.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 158)May include surrounding context.

md
Constructs and executes X API v2 calls inline based on what the user wants. No scripts needed.

API version: **v2**
Base URL: `https://api.twitter.com/2`

> **Requires an X Developer App** with OAuth 1.0a User Context credentials.
> Free tier supports posting, reading own timeline, and basic lookups.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 167)May include surrounding context.

md
Constructs and executes X API v2 calls inline based on what the user wants. No scripts needed.

API version: **v2**
Base URL: `https://api.twitter.com/2`

> **Requires an X Developer App** with OAuth 1.0a User Context credentials.
> Free tier supports posting, reading own timeline, and basic lookups.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 176)May include surrounding context.

md
Constructs and executes X API v2 calls inline based on what the user wants. No scripts needed.

API version: **v2**
Base URL: `https://api.twitter.com/2`

> **Requires an X Developer App** with OAuth 1.0a User Context credentials.
> Free tier supports posting, reading own timeline, and basic lookups.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 184)May include surrounding context.

md
Constructs and executes X API v2 calls inline based on what the user wants. No scripts needed.

API version: **v2**
Base URL: `https://api.twitter.com/2`

> **Requires an X Developer App** with OAuth 1.0a User Context credentials.
> Free tier supports posting, reading own timeline, and basic lookups.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 202)May include surrounding context.

md
Constructs and executes X API v2 calls inline based on what the user wants. No scripts needed.

API version: **v2**
Base URL: `https://api.twitter.com/2`

> **Requires an X Developer App** with OAuth 1.0a User Context credentials.
> Free tier supports posting, reading own timeline, and basic lookups.

Static analysis

No suspicious patterns detected.