T09 · Insecure Skill Coding Practices
- Location
USAGE_GUIDE.md:206- Finding
Live API credentials committed in project documentation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
USAGE_GUIDE.md:206Live API credentials committed in project documentation
scripts/test-tweet-graphql.js:90GraphQL test script prints authentication secrets to standard output
.claude/settings.local.json:3Wildcard node execution permission violates least privilege
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.
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.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
│ └── COMPLETION_SUMMARY.md ← 项目总结(本文件)
│
├── 🔧 配置文件
│ ├── .env ← 环境变量(已配置)
│ ├── .env.example ← 示例配置
│ └── package.json ← 依赖配置(已更新)
│
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
│ └── COMPLETION_SUMMARY.md ← 项目总结(本文件)
│
├── 🔧 配置文件
│ ├── .env ← 环境变量(已配置)
│ ├── .env.example ← 示例配置
│ └── package.json ← 依赖配置(已更新)
│
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
│ └── COMPLETION_SUMMARY.md ← 项目总结(本文件)
│
├── 🔧 配置文件
│ ├── .env ← 环境变量(已配置)
│ ├── .env.example ← 示例配置
│ └── package.json ← 依赖配置(已更新)
│
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
│ └── COMPLETION_SUMMARY.md ← 项目总结(本文件)
│
├── 🔧 配置文件
│ ├── .env ← 环境变量(已配置)
│ ├── .env.example ← 示例配置
│ └── package.json ← 依赖配置(已更新)
│
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
│ └── COMPLETION_SUMMARY.md ← 项目总结(本文件)
│
├── 🔧 配置文件
│ ├── .env ← 环境变量(已配置)
│ ├── .env.example ← 示例配置
│ └── package.json ← 依赖配置(已更新)
│
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
│ └── COMPLETION_SUMMARY.md ← 项目总结(本文件)
│
├── 🔧 配置文件
│ ├── .env ← 环境变量(已配置)
│ ├── .env.example ← 示例配置
│ └── package.json ← 依赖配置(已更新)
│
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
│ └── COMPLETION_SUMMARY.md ← 项目总结(本文件)
│
├── 🔧 配置文件
│ ├── .env ← 环境变量(已配置)
│ ├── .env.example ← 示例配置
│ └── package.json ← 依赖配置(已更新)
│
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.
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.
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.
# .env 文件已存在
cat /Users/chao/.openclaw/workspace/skills/twitter-dance/.env
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.
# .env 文件已存在
cat /Users/chao/.openclaw/workspace/skills/twitter-dance/.env
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.
# .env 文件
APIDANCE_API_KEY=your-api-key
TWITTER_AUTH_TOKEN=your-auth-token
KIMI_API_KEY=sk-xxx # 可选
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.
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.
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.
Referenced artifact was not completely inspected
node scripts/auto-tweet.js --draft-only
Referenced artifact was not completely inspected
node scripts/auto-tweet.js --draft-only
Referenced artifact was not completely inspected
node scripts/auto-tweet.js --draft-only
Referenced artifact was not completely inspected
node scripts/auto-tweet.js --draft-only
Referenced artifact was not completely inspected
node scripts/auto-tweet.js --draft-only
Referenced artifact was not completely inspected
node scripts/auto-tweet.js --draft-only
Referenced artifact was not completely inspected
node scripts/test-tweet-graphql.js "你的推文内容"
Referenced artifact was not completely inspected
node scripts/test-advanced-features.js stats
No suspicious patterns detected.