T09 · Insecure Skill Coding Practices
- Location
scripts/post-media.js:23- Finding
Unrestricted Local File Selection for Remote Media Upload
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a real X/Twitter publishing helper, but it can directly post, upload media, and delete tweets using live account credentials without code-enforced confirmation.
Install only if you are comfortable giving the skill live X account credentials. Use least-privilege X tokens, test with a non-production account first, review every final post/media path manually, and avoid invoking delete-tweet.js or direct publishing unless you intentionally want immediate irreversible account changes.
scripts/post-media.js:23Unrestricted Local File Selection for Remote Media Upload
scripts/post-tweet.js:27Publishing and Deletion Operations Execute Without Enforced User Confirmation
The skill advertises an assistant-style workflow but appears to include direct posting capability with no explicit declared permissions. In a skill that uses X API credentials, undeclared write actions are dangerous because they can publish content on behalf of the user without sufficiently transparent authorization boundaries.
The skill advertises an assistant-style workflow but appears to include direct posting capability with no explicit declared permissions. In a skill that uses X API credentials, undeclared write actions are dangerous because they can publish content on behalf of the user without sufficiently transparent authorization boundaries.
The skill advertises an assistant-style workflow but appears to include direct posting capability with no explicit declared permissions. In a skill that uses X API credentials, undeclared write actions are dangerous because they can publish content on behalf of the user without sufficiently transparent authorization boundaries.
The skill advertises an assistant-style workflow but appears to include direct posting capability with no explicit declared permissions. In a skill that uses X API credentials, undeclared write actions are dangerous because they can publish content on behalf of the user without sufficiently transparent authorization boundaries.
The skill advertises an assistant-style workflow but appears to include direct posting capability with no explicit declared permissions. In a skill that uses X API credentials, undeclared write actions are dangerous because they can publish content on behalf of the user without sufficiently transparent authorization boundaries.
The skill advertises an assistant-style workflow but appears to include direct posting capability with no explicit declared permissions. In a skill that uses X API credentials, undeclared write actions are dangerous because they can publish content on behalf of the user without sufficiently transparent authorization boundaries.
Referenced artifact was not completely inspected
| `collect-info.js` | 使用 Exa/MiniMax/Brave Search 收集信息 |
Referenced artifact was not completely inspected
| `generate-tweet.js` | 根据主题和风格生成推文内容 |
Referenced artifact was not completely inspected
| `post-tweet.js` | 发布单条推文 |
Referenced artifact was not completely inspected
| `post-thread.js` | 发布推文串 |
Referenced artifact was not completely inspected
| `post-media.js` | 发布带媒体的推文 |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## 故障排除
- 如果收到 401 错误,检查 Access Token 是否有效
- 如果收到 403 错误,检查 App 权限
- 如果图片生成失败,检查 API 配置
The README instructs users to execute npx clawhub@latest install x-expert, which pulls and runs the latest package version at install time rather than a pinned, reviewed release. This creates a supply-chain risk: if the upstream package is compromised or a breaking/malicious update is published, users may execute attacker-controlled code during installation.
The README advertises a delete-tweet.js script even though the described skill scope is a create/plan/publish assistant. This scope expansion introduces a destructive capability that users may not expect, increasing the risk of accidental or hidden content deletion if the skill or surrounding agent invokes undocumented actions.
The README lists tweet deletion as a supported script without any warning that it is a destructive operation. In a conversational publishing skill, omission of a prominent warning and confirmation expectations makes accidental or socially engineered deletion more plausible, especially if users assume all listed actions are routine and safe.
The skill is explicitly designed to publish, schedule, and delete tweets using real X credentials, but the README does not warn users that these actions affect live accounts and may be public, automated, or difficult to fully undo. In this context, lack of an operational safety warning increases the chance of accidental posting, reputational damage, unintended deletions, or misuse of privileged social-media access.
The README instructs users to run npx clawhub@latest install x-expert, which fetches and executes the latest CLI code without pinning a specific trusted version. If the upstream package is compromised or a breaking/malicious release is published, users could execute attacker-controlled code during installation.
The skill declares access to environment variables and relies on outbound network activity, but it does not declare an explicit tool scope such as permissions or allowed-tools. That makes the skill's effective authority opaque to users and reviewers, increasing the chance of unintended credential use or external data transmission.
The manifest description forces a specific language/locale for the skill experience by presenting the core description entirely in Chinese. The file does not indicate that users can choose another language or that the Chinese-only behavior is limited to a justified region-specific use case.
The prescribed user prompts throughout the workflow are all fixed in Chinese, which creates a language policy issue when no alternative language path or opt-in is provided. Because these are the required interaction strings, the skill effectively enforces one locale for all users.
The documentation says publishing should default to user confirmation, but it also offers a 'direct publish' review mode. For a skill with posting authority to a social-media account, this weakens a key safety barrier and can lead to accidental or unauthorized publication.
The file presents its purpose and CLI usage entirely in Chinese, including the expected query example, which implies a language-specific interaction model. The policy allows locale constraints only when users are given a choice or the restriction is clearly documented and justified; neither is present here.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
throw new Error('EXA_API_KEY not set');
}
const response = await fetch('https://api.exa.ai/search', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
throw new Error('EXA_API_KEY not set');
}
const response = await fetch('https://api.exa.ai/search', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
throw new Error('MINIMAX_API_KEY not set');
}
const response = await fetch('https://api.minimax.chat/v1/web_search', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Detected: suspicious.env_credential_access