Back to skill

Security audit

xpull

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-aligned for pulling X/Twitter content, but users should know it sends requested URLs or searches to FxTwitter or xAI and can read an xAI key from a local .env file.

Install only if you are comfortable sending the X/Twitter URLs or search queries you request to FxTwitter or xAI. Keep XAI_API_KEY scoped to xAI, avoid placing unrelated secrets in the working directory .env, and watch the documented paid Grok usage cap.

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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Ae1

High
Category
analysis-evasion
Content
- `fx-fetch.mjs` — free, no credentials, no state. Calls `api.fxtwitter.com` only.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- `grok-x-search.mjs` — requires `XAI_API_KEY`. Writes `.grok-state.json` next to the script to enforce the daily cap. Calls `api.x.ai` only.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Credential Access

High
Category
Privilege Escalation
Content
*   grok-x-search.mjs replies <url>
 *   grok-x-search.mjs search <query> [--from handle]
 *
 * Requires XAI_API_KEY in env or .env in current directory.
 * Daily cap: 20 calls (override: GROK_DAILY_CAP).
 */
import https from 'https';
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
*   grok-x-search.mjs replies <url>
 *   grok-x-search.mjs search <query> [--from handle]
 *
 * Requires XAI_API_KEY in env or .env in current directory.
 * Daily cap: 20 calls (override: GROK_DAILY_CAP).
 */
import https from 'https';
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
function getKey() {
  if (process.env.XAI_API_KEY) return process.env.XAI_API_KEY;
  const f = resolve(process.cwd(), '.env');
  if (existsSync(f)) { const m = readFileSync(f, 'utf8').match(/^XAI_API_KEY=(.+)$/m); if (m) return m[1].trim(); }
  return null;
}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill declares access to environment variables via metadata (`XAI_API_KEY`, optional cap settings) but does not define an explicit tool scope such as `permissions` or `allowed-tools`. That creates ambiguity about what runtime capabilities the skill is intended to have, increasing the risk of over-broad execution or unintended secret exposure when the skill is loaded by an agent framework.

External Transmission

Medium
Category
Data Exfiltration
Content
tools: [{ type: 'x_search', ...toolParams }],
  });
  return new Promise((resolve, reject) => {
    const req = https.request('https://api.x.ai/v1/responses', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${apiKey}` },
    }, res => {
Confidence
84% confidence
Finding
This code transmits prompts containing user-provided URLs or search terms, plus any handle restrictions, to https://api.x.ai/v1/responses. External transmission is expected for this feature, but it is still a security-relevant behavior because potentially sensitive user input is disclosed to a third party and may be logged, retained, or processed outside the user's control.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The script sends user-supplied search queries and URLs to xAI's external API, but it does not provide an inline warning or explicit disclosure at the call site that this input leaves the local environment. In a data-retrieval skill, users may reasonably paste sensitive URLs, private identifiers, or investigative queries, so the lack of a clear disclosure creates a real privacy and compliance risk even though the transmission is the intended functionality.

Static analysis

No suspicious patterns detected.