Back to skill

Security audit

twitter-dance

Security checks for vulnerabilities and agentic risk

Overview

This Twitter automation skill needs Review because it combines powerful account actions with unsafe credential handling, including exposed keys, browser-token extraction guidance, and secret-printing scripts.

Install only after removing and rotating the exposed credentials, replacing browser-token scraping with a scoped official auth flow, redacting all logs and examples, removing the wildcard node -e permission, and disabling scheduled posting until you explicitly approve the account actions and limits.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
USAGE_GUIDE.md:206
Finding

Live API credentials committed in project documentation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/test-tweet-graphql.js:90
Finding

GraphQL test script prints authentication secrets to standard output

Content
View full analysis
'} apikey: ${process.env.APIDANCE_API_KEY || ''} User-Agent: Apidog/1.0.0 (https://apidog.com) Content-Type: application/json Accept: */* ``` The script initializes the client with live environment credentials and later interpolates those same values directly into console output: ```javascript const client = new TwitterDanceAPIClient({ apiKey: process.env.APIDANCE_API_KEY, authToken: process.env.TWITTER_AUTH_TOKEN, verbose: 2 }); ``` ### Technical Analysis The test script prints the complete Twitter authentication token and apidance.pro API key whenever the corresponding environment variables are configured. Standard output is frequently retained outside the process boundary by CI systems, shell session recorders, terminal-sharing tools, Agent transcripts, monitoring platforms, container logs, or support bundles. Checking whether a credential is configured does not require exposing its value. Printing the complete authentication headers creates a secondary secret-distribution channel and defeats the protection gained from storing credentials in environment variables. The script also enables verbose request and response logging. Although the reviewed core client does not print authentication headers itself, verbose diagnostic behavior should be designed around explicit redaction to prevent future changes from exposing additional sensitive values. ### Attack Path 1. A user or CI job configures `TWITTER_AUTH_TOKEN` and `APIDANCE_API_KEY`. 2. The documented GraphQL test script is executed. 3. The script writes both complete credentials to standard output. 4. A terminal logger, CI system, Agent transc ...[truncated 916 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
.claude/settings.local.json:3
Finding

Wildcard node execution permission violates least privilege

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (135)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The guide explicitly instructs users to extract the Twitter/X auth_token cookie from browser developer tools and place it into .env for automation. That cookie is a live session credential; encouraging manual extraction and reuse outside the browser materially increases risk of account compromise, session hijacking, accidental leakage in logs/files, and use of unofficial automation against the platform account.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

These lines directly instruct the user to locate the browser auth_token cookie and reuse it for scripted automation. Reusing browser session material outside its intended context is dangerous because anyone who obtains that token can often act as the account holder until the session is revoked, and the skill context—automated replying at scale—makes abuse more consequential.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · COMPLETION_SUMMARY.md (reported line 112)May include surrounding context.

md
│   └── COMPLETION_SUMMARY.md          ← 项目总结(本文件)
│
├── 🔧 配置文件
│   ├── .env                           ← 环境变量(已配置)
│   ├── .env.example                   ← 示例配置
│   └── package.json                   ← 依赖配置(已更新)
│

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · COMPLETION_SUMMARY.md (reported line 201)May include surrounding context.

md
│   └── COMPLETION_SUMMARY.md          ← 项目总结(本文件)
│
├── 🔧 配置文件
│   ├── .env                           ← 环境变量(已配置)
│   ├── .env.example                   ← 示例配置
│   └── package.json                   ← 依赖配置(已更新)
│

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · FEATURES.md (reported line 300)May include surrounding context.

md
│   └── COMPLETION_SUMMARY.md          ← 项目总结(本文件)
│
├── 🔧 配置文件
│   ├── .env                           ← 环境变量(已配置)
│   ├── .env.example                   ← 示例配置
│   └── package.json                   ← 依赖配置(已更新)
│

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · IMPLEMENTATION_NOTES.md (reported line 207)May include surrounding context.

md
│   └── COMPLETION_SUMMARY.md          ← 项目总结(本文件)
│
├── 🔧 配置文件
│   ├── .env                           ← 环境变量(已配置)
│   ├── .env.example                   ← 示例配置
│   └── package.json                   ← 依赖配置(已更新)
│

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · USAGE_GUIDE.md (reported line 199)May include surrounding context.

md
│   └── COMPLETION_SUMMARY.md          ← 项目总结(本文件)
│
├── 🔧 配置文件
│   ├── .env                           ← 环境变量(已配置)
│   ├── .env.example                   ← 示例配置
│   └── package.json                   ← 依赖配置(已更新)
│

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · USAGE_GUIDE.md (reported line 201)May include surrounding context.

md
│   └── COMPLETION_SUMMARY.md          ← 项目总结(本文件)
│
├── 🔧 配置文件
│   ├── .env                           ← 环境变量(已配置)
│   ├── .env.example                   ← 示例配置
│   └── package.json                   ← 依赖配置(已更新)
│

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · USAGE_GUIDE.md (reported line 313)May include surrounding context.

md
│   └── COMPLETION_SUMMARY.md          ← 项目总结(本文件)
│
├── 🔧 配置文件
│   ├── .env                           ← 环境变量(已配置)
│   ├── .env.example                   ← 示例配置
│   └── package.json                   ← 依赖配置(已更新)
│

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation explicitly tells the user to run cat on the full .env file, which will print API keys and auth tokens in plaintext. In an agent or shared-terminal context, this can expose credentials to logs, transcripts, screenshots, or downstream tools, enabling account takeover or API abuse.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This finding is a direct secret-disclosure issue: instructing users to read and display the full .env file can leak configured credentials in plaintext. Because the same document states that API keys and Twitter auth tokens are already configured, the risk is elevated from hypothetical to likely real credential exposure.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

This line contains an explicit command to print the contents of a real .env path. In a skill or agent environment, that can expose live API keys and tokens to console history, orchestration logs, transcripts, and any observer with access to the session.

Content

Scanner excerpt · COMPLETION_SUMMARY.md (reported line 155)May include surrounding context.

第 1 步:配置已完成 ✅

bash
# .env 文件已存在
cat /Users/chao/.openclaw/workspace/skills/twitter-dance/.env

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

This finding is part of the same secret-exposure instruction sequence and reinforces the unsafe guidance to reveal .env contents. Given the document claims the environment already contains configured API credentials, executing this advice would likely disclose usable secrets rather than dummy placeholders.

Content

Scanner excerpt · COMPLETION_SUMMARY.md (reported line 156)May include surrounding context.

第 1 步:配置已完成 ✅

bash
# .env 文件已存在
cat /Users/chao/.openclaw/workspace/skills/twitter-dance/.env

第 2 步:验证配置

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The guide instructs users to store a Twitter auth token, API key, and optional KIMI API key in a local .env file without discussing sensitivity, scoping, rotation, or leakage risks. In a skill/workspace environment, .env files are commonly exposed through commits, backups, logs, support bundles, or permissive file access, making these credentials attractive targets for credential theft and abuse.

Content

Scanner excerpt · GRAPHQL_API_GUIDE.md (reported line 19)May include surrounding context.

2. 配置环境变量

bash
# .env 文件
APIDANCE_API_KEY=your-api-key
TWITTER_AUTH_TOKEN=your-auth-token
KIMI_API_KEY=sk-xxx  # 可选

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The document contains what appears to be a real Kimi API key embedded directly in the quick-start instructions. Publishing a live secret in documentation is a severe credential exposure issue: anyone reading the file can reuse the key, incur charges, access associated services, or pivot into related systems depending on account permissions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The README includes what appears to be a concrete Kimi API key, which is a direct secret exposure. Embedded secrets can be harvested by anyone reading the repository and abused for unauthorized API usage, cost incurrence, and potential access to associated account data.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Instructing users to recover an authorization token from browser requests and reuse it programmatically is an unsafe credential acquisition pattern. It bypasses normal trust boundaries and can lead to account takeover, long-lived unauthorized access, and violations of platform security controls if the token is exfiltrated or reused elsewhere.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/auto-tweet.js --draft-only

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/auto-tweet.js --draft-only

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/auto-tweet.js --draft-only

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/auto-tweet.js --draft-only

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/auto-tweet.js --draft-only

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/auto-tweet.js --draft-only

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/test-tweet-graphql.js "你的推文内容"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/test-advanced-features.js stats

Static analysis

No suspicious patterns detected.