Back to skill

Security audit

xAPI

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a legitimate xapi CLI integration, but it asks agents to run an unpinned remote npm CLI and exposes broad third-party API, OAuth, posting, payment, and persistent credential behavior that needs review before use.

Review this skill carefully before installing. Use only if you are comfortable sending selected queries, prompts, and API inputs to xapi and connected services, and avoid OAuth binding, posting, or payment/top-up commands unless you explicitly intend them. Prefer a pinned, reviewed `xapi-to` version rather than bare `npx xapi-to`, and protect the stored API key and any top-up URLs.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding

Execution of an Unpinned Third-Party npm Package Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 14–18
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Medium

bash
## Installation

xapi is available via npx (no install needed):

```bash
npx xapi-to <command>
text

### Technical Analysis

The skill directs the agent to execute `xapi-to` through `npx` without specifying an exact package version or verifying an integrity digest. When the package is not already available locally, `npx` may retrieve it from the configured npm registry and immediately execute its code.

Because package resolution is mutable, the code executed during a future skill invocation may differ from the code that existed when this skill was reviewed. Compromise of the package, its maintainer account, the package publication process, or the configured registry could therefore turn an otherwise legitimate command into arbitrary local code execution. The same unpinned invocation pattern is repeated throughout `SKILL.md`.

### Attack Path

1. An attacker compromises the `xapi-to` npm package, a publisher account, the package delivery process, or a registry trusted by the environment.
2. The attacker publishes or serves a malicious version under the package name resolved by `npx xapi-to`.
3. An agent follows the skill instructions and runs one of the documented `npx xapi-to` commands.
4. `npx` downloads and executes the attacker-controlled package without an exact version or integrity check.
5. The malicious package executes with the permissions of the agent process and accesses resources available to that account.

### Impact Assessment

Successful exploitation permits arbitrary code execution with the privileges of the user running the agent. The accessible scope may include project files, process environment variables, the xapi API key, `~/.xapi/config.json`, OAuth-related state, and any other files or credentials readable by that user. The pa
...[truncated 281 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the CLI to an exact, reviewed version, for example:
    bash
    npx --yes xapi-to@X.Y.Z <command>
    
  2. Record and verify the package integrity digest through a lockfile or an equivalent trusted verification mechanism.
  3. Document the expected npm registry, official package publisher, and package provenance.
  4. Disable lifecycle scripts during installation where compatible with the package and deployment model.
  5. Prefer installing a reviewed version in a controlled build step rather than downloading executable code during each skill invocation.
  6. Run the CLI under least privilege, with access limited to only the required files, credentials, and network destinations.
  7. Replace every unpinned npx xapi-to example in the skill with the same pinned and verified invocation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (64)

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger language is extremely broad, including common tasks like web search, news lookup, summarization, rewriting, embeddings, capability discovery, and even when the user merely mentions xapi. Overbroad routing can cause unintended invocation of an external-networking skill, increasing unnecessary data exposure and the chance of risky side effects.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

The skill stores its API key in ~/.xapi/config.json and broadly encourages discovery and reuse of external service capabilities, which creates persistent credential and session state beyond a single interaction. In an agent context, long-lived local auth state increases the impact of tool compromise or accidental reuse across unrelated tasks.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: xapi
description: Use xapi CLI to access real-time external data — Twitter/X profiles, tweets, and timelines, crypto token prices and metadata, web search, news, and AI text processing (summarize, rewrite, chat, embeddings). Trigger this skill whenever the user wants to look up a Twitter user, get tweet details, check crypto prices, search the web or news, generate embeddings, summarize or rewrite text, or call any third-party API through xapi. Also use this skill when the user mentions xapi, asks about available capabilities or APIs, or wants to discover what external services are accessible.
homepage: https://xapi.to
metadata: {"openclaw":{"emoji":"x","requires":{"anyBins":["npx"]},"primaryEnv":"XAPI_API_KEY"}}
---

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is described as a data-access and text-processing tool, but the documentation includes state-changing actions such as posting tweets, binding OAuth, and payment/top-up flows. This scope mismatch can cause an agent or user to invoke capabilities with materially greater risk than implied by the top-level description.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description explicitly advertises the ability to 'call any third-party API through xapi,' which is far broader than the named Twitter, crypto, search, news, and AI use cases. That broad proxy access expands the reachable attack surface and can enable unintended data transfer or use of sensitive write-capable endpoints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill encourages sending search queries, user text, and AI prompts to external services but does not prominently warn users that their content will leave the local environment. This creates privacy and data-handling risk, especially for summarization, rewriting, chat, and embeddings where users may provide sensitive text.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill repeatedly instructs execution via npx xapi-to without pinning an exact package version. This creates a supply-chain risk: every invocation may fetch whatever version is current on the registry, allowing malicious updates, compromised maintainers, or dependency hijacks to alter agent behavior and potentially access credentials or exfiltrate data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The command uses an unpinned npx package reference, so execution depends on the latest published package rather than a reviewed build. In an agent context this is especially dangerous because the tool handles API keys and external requests, so a compromised package could steal secrets or perform unauthorized actions.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This invocation relies on an unversioned package fetched through npx, exposing the workflow to registry-side package substitution or malicious upstream releases. Because the command configures authentication material, compromise here could directly expose the user's API key or alter stored configuration.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Running npx xapi-to without an exact version makes the skill trust mutable upstream code on every execution. This is a classic supply-chain weakness and is amplified by the CLI's access to networked APIs, local config files, and environment variables.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill's search step is performed through an unpinned npx package, meaning the binary's code can change between runs without review. An attacker controlling a package update could change search or output behavior and stage credential theft or command abuse.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This example also executes a mutable package reference through npx, introducing avoidable supply-chain exposure. Since the skill encourages frequent use, the repeated pattern increases the attack surface and the chance of unsafe copy-paste adoption.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The get command relies on an unpinned package fetched at execution time, so the schema-inspection step itself is not trustworthy. A malicious package version could misrepresent action requirements or influence subsequent calls while accessing local secrets.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The call example executes arbitrary current registry code via npx, which is unsafe for a CLI that can contact third-party services and use stored authentication. In a compromised-update scenario, this could result in data exfiltration, unauthorized API calls, or tampered outputs.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This Twitter profile lookup example still depends on an unpinned remote package. The risk is not in the lookup function itself but in the implicit trust placed in whatever package version npx resolves at runtime.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

An unpinned npx invocation is a real supply-chain vulnerability because the executed code is mutable and fetched from the registry at runtime. Given that this CLI interfaces with external accounts and data, a malicious update could silently change requests or capture inputs.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This tweet detail example inherits the same unpinned-package supply-chain issue. The documentation normalizes unsafe execution patterns, making operator misuse more likely and broadening the exposure across many workflows.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using bare npx xapi-to for media lookup allows execution of unreviewed upstream code. Because the package may evolve independently of the skill, reproducibility and trust are lost, and a registry compromise could affect all users immediately.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The followers/following example repeats an unpinned network-fetched package execution. This can enable tampered binaries to harvest tokens, modify requests, or return misleading results while appearing to follow documented behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Tweet search through an unpinned package is a true vulnerability because it hands execution control to mutable upstream code at runtime. In an agent environment that may process user-provided queries at scale, that exposure is operationally significant.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This command executes an unversioned package reference, creating a supply-chain trust gap. The risk is elevated by the skill's broad access to external services and potential possession of API keys in env vars or config files.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The batch profile lookup example uses the same unsafe unpinned npx pattern. A compromised package could alter batched requests, capture inputs, or leak stored credentials with little visibility to the operator.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The note references a command that depends on an unpinned package, preserving the same mutable-code execution risk. This is particularly concerning because it is positioned as a prerequisite step for many later operations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The crypto price example still runs bare npx xapi-to, exposing users to unreviewed upstream package changes. Since financial data and related account actions are involved elsewhere in the skill, a malicious package could manipulate outputs or requests for fraud.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This metadata lookup command is another instance of mutable runtime package resolution via npx. The vulnerability is systemic because the skill repeatedly embeds the pattern rather than isolating it to a single example.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Web search requests are sent through an unpinned package, so the path from user query to remote service is mediated by mutable code. That code could exfiltrate queries, modify destinations, or inject additional telemetry without notice.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.