Back to skill

Security audit

K test

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward X/Twitter search helper that uses the xAI API as disclosed, with no hidden persistence, destructive behavior, or unrelated data access found.

Install this only if you are comfortable sending search terms and filters to xAI using your XAI_API_KEY. Avoid searching for confidential or regulated information unless your xAI account and policies permit that use.

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)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares executable/network-capable behavior and use of environment secrets, but does not specify an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and can cause the host agent to grant broader execution or network access than users expect, especially since the skill calls an external API with an API key.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description uses broad trigger phrases like 'find tweets,' 'search X/Twitter,' and 'look up what people are saying,' which are common conversational intents that may cause the skill to be invoked more often than a narrowly scoped skill. Over-broad invocation can unexpectedly send user queries to an external service and consume credentials or expose user content without sufficiently clear intent.

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code packages the user's query into a JSON request body and sends it to an external service at api.x.ai, but there is no confirmation prompt, print/log notice, or explanatory comment warning that user-provided content will be transmitted off-host. For a code file, outbound HTTP transmission of user data should have some visible disclosure unless the warning exists elsewhere in markdown, which is not present in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The setup and usage examples describe sending search queries to the xAI API for X search, but they do not clearly warn users that prompts, handles, date ranges, and possibly media-related query context are transmitted to an external provider. This can create a transparency and privacy issue when users assume the request is handled locally or are unaware of third-party data sharing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script reads a sensitive environment variable containing API credentials, but the file does not include a warning, explanatory comment, or other user-facing disclosure about credential usage. This matches the code-file criterion for sensitive environment variable access without visible disclosure in the reviewed file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.