Back to skill

Security audit

X Search 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it searches X/Twitter through xAI, but users should know their search text is sent to xAI.

Install this only if you are comfortable sending X/Twitter search queries, handles, dates, and media options to xAI. Avoid putting secrets, private incident details, or confidential business data in searches, and use an API key with only the access needed for xAI search.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill requires environment access and makes outbound API calls, but it does not declare any explicit tool scope such as permissions or allowed-tools. That weakens least-privilege controls and makes it harder for a host framework or reviewer to understand and constrain what the skill is allowed to access.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The description uses broad trigger language like finding tweets, looking up what people are saying, or finding social media posts about a topic, which can match many common user requests. Overly broad invocation criteria can cause the skill to activate unexpectedly and send user queries to an external service when the user did not clearly intend that behavior.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation shows direct usage of a script that submits the user's search terms to the xAI API, but it does not warn that those queries leave the local environment and are transmitted to a third party. This creates a privacy and data-handling risk, especially if users include sensitive internal names, credentials, incident details, or other confidential content in search prompts.

External Transmission

Medium
Category
Data Exfiltration
Content
def redirect_request(self, req, fp, code, msg, headers, newurl):
        raise HTTPError(newurl, code, f"Redirect to {newurl} blocked (auth safety)", headers, fp)

API_URL = "https://api.x.ai/v1/responses"
MODEL = "grok-4.20-reasoning"
TIMEOUT_S = 120
MAX_HANDLES = 10
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This code serializes the user's search query into a request body and sends it to the external xAI API over HTTP, but there is no confirmation prompt, visible user-facing notice, or comment/docstring warning that user-provided content will be transmitted off-system. For a code file, outbound transmission of user data should have some form of disclosure unless clearly surfaced elsewhere.

Missing User Warnings

Low
Confidence
78% confidence
Finding
The script reads the XAI_API_KEY credential from the environment, but the file provides no user-facing notice, comment, or help text indicating that it depends on and accesses a sensitive credential. Under the code-file criteria, sensitive environment-variable access without any disclosure is a missing-warning issue.

Static analysis

No suspicious patterns detected.