Back to skill

Security audit

X Engagement Pro

Security checks for vulnerabilities and agentic risk

Overview

This skill is for X/Twitter automation, but it can perform public account actions automatically and contains unsafe command construction around those actions.

Install only if you are comfortable granting this skill X/Twitter posting authority. Review and fix the command construction and rate-limit state handling before enabling scheduled reply, amplify, or all modes; keep it in manual mode until those controls are clear.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
agents/engagement-agent.js:65
Finding

Shell Command Injection Through Unvalidated Command Interpolation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
agents/engagement-agent.js:23
Finding

Broken and Non-Persistent Daily Engagement Limit

Content
View full analysis
= config.maxPostsPerDay) { return { skipped: 'Rate limit reached' } } // Fetch mentions and keywords const mentions = await this.fetchMentions() const keywordPosts = await this.searchKeywords(config.keywords) // Process engagement const toEngage = this.prioritize(mentions, keywordPosts, config) for (const post of toEngage) { if (todayPosts >= config.maxPostsPerDay) break await this.engage(post, config) todayPosts++ } return { engaged: toEngage.length, rateLimited: todayPosts >= config.maxPostsPerDay } ``` ### Technical Analysis `todayPosts` is declared with `const` but is incremented with `todayPosts++`. After the first completed `engage()` call, JavaScript throws a `TypeError` because a constant binding cannot be reassigned. The counter is also never written back to `state.postsToday`. Even if the declaration were changed to `let`, later heartbeat or cron executions could reload the old value and repeat engagement without honoring the cumulative daily limit. The implementation does not provide an atomic state update. Concurrent triggers could therefore read the same starting count and independently perform actions beyond the configured maximum. In addition, the returned `engaged` value is `toEngage.length`, rather than the number of actions successfully completed, which can misrepresent enforcement and operational results. ### Attack Path 1. The heartbeat or cron trigger invokes the agent with `state.postsToday` absent, stale, or lower than the actual number of completed actions. 2. The agent retrieves posts and calls `engage()` for the first selected item. 3. After the external action is performed, `todayPosts++` attempts to modify a constant and throws. 4. ...[truncated 1103 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly promotes automated posting and engagement on X without disclosing key risks such as account suspension, rate-limit violations, unintended public posting, or transmission of account/content data to external services. In a social-media automation context, omission of these warnings can mislead users into enabling behavior that affects their account reputation, compliance posture, and privacy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This skill performs outward social-media actions (replying and liking) automatically once triggered, without any interactive approval, explicit disclosure, or safety gating at action time. In this context, that can cause unintended public posting, reputational damage, spam-like behavior, or policy violations if the agent engages with harmful, sensitive, or manipulated content.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description is broad enough to cover a wide range of social-media activity, which can cause the agent to invoke this skill in contexts the user did not explicitly intend. Because the skill also requests write access to X and advertises auto-posting/engagement behavior, overbroad invocation increases the chance of unintended posting or account actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The code reads process.env.X_API_KEY and forwards it into subprocess environment variables for xapi commands. This is a sensitive-credential access path, and the file does not include any user-facing warning, confirmation, or disclosure about using account credentials.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The inline documentation at L095 states 'Sort by score and engagement', which implies both factors influence ordering. The actual comparator at L097 uses only 'b.score - a.score', so engagement is not considered at all.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

At L104 the comment says the code will 'Generate response based on content type', but 'generateResponse' simply returns a random template and does not inspect 'post' or 'config'. This is an intent-level mismatch between the documentation and behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
64% confidence
Finding

The natural-language description explicitly targets "X (Twitter)" engagement as the default platform. While not inherently unsafe, this can create a policy concern if the organization expects user choice of platform or locale/context rather than a fixed default, and the manifest does not state that this is an opt-in platform-specific skill.

Content

No source excerpt is available for this finding.