Back to skill

Security audit

X Search (Local)

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to do what it says: it searches X through xAI with a user API key and shows no hidden persistence, destructive behavior, or unrelated data access.

Install only if you intend to send search queries to xAI using your own XAI_API_KEY. Avoid putting sensitive private information in searches, and be aware that the trigger wording is broad enough that an agent might choose it for some general social-media requests unless you specify X/Twitter clearly.

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

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes Python and requires both environment-variable access and outbound network access, but it does not declare an explicit tool scope such as permissions or allowed-tools. That weakens least-privilege controls and makes it harder for a host agent or reviewer to understand and constrain what the skill is allowed to access, increasing the risk of unintended secret exposure or broader-than-expected external communication.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The activation description includes broad phrases like "find social media posts about a topic" and "look up what people are saying," which can overlap with everyday search requests and may cause unintended invocation. The description does not provide exclusion conditions or negative examples to clarify when this skill should be used instead of more general web or social-search tools.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/search.py (reported line 18)May include surrounding context.

python
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

Static analysis

No suspicious patterns detected.