Back to skill

Security audit

X Brand Operator

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent social-media automation tool, but it can create recurring public account actions and use a logged-in browser profile without enough explicit controls.

Install only if you intend to run unattended X/Twitter brand automation. Before enabling it, use a dedicated xurl app and browser profile for the correct account, review each cron schedule, confirm the Telegram recipient, prefer dry-run or manual approval for posts and engagement, and ensure dynamic command arguments are passed safely rather than through shell interpolation.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:25
Finding
Shell Command Injection Through Unsafely Interpolated Content<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:25` - `references/cron-config.md:28` - `references/cron-config.md:55` - `references/engagement-playbook.md:51-53` **Vulnerability Type**: Shell command injection through direct interpolation of generated or configurable values **Risk Level**: High ### Vulnerable Code `SKILL.md:25`: ```bash xurl --app <app> post "<tweet text>" ``` `references/cron-config.md:28`: ```text Primary: exec → xurl --app <app> post "<tweet>" ``` `references/cron-config.md:55`: ```text 1. Search each keyword: xurl --app <app> search "<keyword>" -n 5 ``` `references/engagement-playbook.md:51-53`: ```text 1. `xurl like <tweet_id>` 2. Write reply (personalised, quality-checked) 3. `xurl reply <tweet_id> "<reply>"` → fallback to browser if fails ``` ### Technical Analysis The Skill constructs shell-style commands by inserting values such as `<app>`, `<tweet text>`, `<keyword>`, `<tweet_id>`, and `<reply>` directly into command strings. Several of these values are generated from brand configuration, model output, user input, or content retrieved from X/Twitter. Wrapping a value in double quotes does not make it safe for shell execution. If the underlying `exec` implementation invokes a command shell, characters such as double quotes, command substitutions, backticks, variable expansions, redirection operators, and command separators may still alter the intended command. For example, generated text containing a closing quote followed by shell syntax could terminate the expected argument and introduce another command. The risk is particularly relevant because reply and posting content may be influenced by external social-media posts. Quality scoring and personalization requirements do not constitute syntactic validation or shell escaping. ### Attack Path 1. An attacker supplies malicious brand configuration, asks the operator to use crafted tweet text, or publishes an X/Twitter post designed to influence a generat ...[truncated 1622 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Avoid shell command construction.** Invoke `xurl` using a process API that accepts an executable and an argument array, for example conceptually: ```text executable: xurl arguments: ["--app", validatedApp, "post", generatedTweet] shell: false ``` 2. **Pass content as a literal argument or through standard input.** Do not concatenate tweets, replies, keywords, usernames, or identifiers into a command string. 3. **Disable shell evaluation explicitly.** Ensure the execution API uses `shell: false` or its platform-equivalent setting. 4. **Validate structured fields with allowlists.** - Restrict application names to an expected set or a conservative pattern. - Require tweet IDs to contain digits only. - Validate usernames against the syntax accepted by X/Twitter. - Enforce documented length limits on tweets, replies, and search terms. 5. **Do not treat quote wrapping as escaping.** If a shell cannot be avoided, use a platform-tested escaping routine for every dynamic argument. Argument-array execution is strongly preferred. 6. **Separate untrusted source content from executable instructions.** Treat social-media posts and user-provided brand material as data only. Do not copy source text into command templates without safe argument handling. 7. **Add adversarial tests.** Test generated content containing quotes, backticks, `$()`, semicolons, pipes, redirections, newlines, and platform-specific metacharacters. Verify that each value reaches `xurl` as one literal argument and cannot invoke another process. 8. **Apply least privilege.** Run the automation under a dedicated account with minimal filesystem access, restricted environment variables, and only the service permissions required for posting and engagement. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list is broad enough to match common social-media requests and can invoke a skill that performs real external actions on X/Twitter. Because the skill can post, reply, follow, and schedule recurring jobs, accidental invocation could cause unintended account activity or automation setup without sufficiently explicit user intent.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill explicitly uses a browser fallback with a user profile, which means actions may be taken through an already logged-in X account. Without a prominent warning and confirmation, users may not realize the skill can bypass API-only behavior and directly act as them in the browser, increasing the risk of unauthorized posting or engagement from the wrong account.

Session Persistence

Medium
Category
Rogue Agent
Content
- `xurl --app <app>` — Post, reply, like, follow, search via X API v2
- `browser` — Fallback for posting/replying when xurl fails (profile: user)
- `cron` — Schedule recurring tasks (post, engage, report)
- `message` — Send Telegram alerts on failures or completions

## Posting a Tweet
Confidence
83% confidence
Finding
The skill is designed to create recurring cron-based automation for posting, engagement, and reporting, which persists beyond the initiating session. Persistent scheduled actions increase risk because a mistaken setup, compromised prompt, or wrong account context can continue causing repeated external actions without fresh user review.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The failure path instructs the agent to send Telegram alerts that include draft text, but there is no privacy notice or sensitivity check. Draft posts may contain unpublished marketing copy, internal links, embargoed announcements, or personal data, so forwarding them to another channel can create an unnecessary data exposure risk.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill explicitly automates external social account actions including posting, replying, liking, and following, but provides no user-facing warning, consent checkpoint, or policy guardrail around automated third-party account activity. In a cron-driven configuration, this increases the chance of unattended actions that could violate platform rules, damage account reputation, or perform unintended engagement at scale.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The weekly report is configured to send follower metrics, engagement results, and operational activity summaries to Telegram without any privacy notice or handling guidance. That creates a data-leakage risk because analytics, account activity, and potentially sensitive business performance information are automatically transmitted to an external messaging channel on a schedule.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The instruction "Write an English tweet" imposes a specific language requirement in natural language. Under SQP-3, forcing a language without user opt-in or documented justification is a policy concern.

Static analysis

No suspicious patterns detected.