Back to skill

Security audit

xAPI

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent xapi CLI wrapper, but it gives broad external API, OAuth-backed posting, persistent credential, payment, and unpinned package execution paths that deserve manual review before installation.

Review this skill before installing. Use it only in a restricted environment, pin or preinstall a reviewed `xapi-to` version, avoid giving it sensitive documents unless you intend to send them to external services, require explicit confirmation before OAuth binding or write actions such as posting tweets, and treat top-up URLs and `~/.xapi/config.json` as secrets.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:13
Finding

Unpinned npm Package Is Downloaded and Executed Through npx

Content
View full analysis

Vulnerability Details

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

Vulnerable code:

markdown
## 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, integrity hash, or trusted lockfile. This pattern is repeated throughout the document for all supported operations.

When the package is not already available locally, `npx` can retrieve the current package release from the configured npm registry and immediately execute its code. Consequently, the effective executable can change after the skill has been audited. Compromise of the package, its maintainer account, the package publication process, or the configured registry could turn an otherwise legitimate command into arbitrary local code execution.

This is a supply-chain weakness rather than evidence that the currently published package is malicious.

### Attack Path

1. An attacker compromises the `xapi-to` package, a publisher account, or the package distribution channel.
2. The attacker publishes a modified release under the same package name.
3. An agent follows `SKILL.md` and invokes an ordinary command such as `npx xapi-to search "twitter"`.
4. Because no audited version is pinned, `npx` resolves and downloads the attacker-controlled release.
5. Package lifecycle or CLI code executes with the permissions and environment of the agent process.
6. The malicious package can access files and environment variables available to that process, potentially including `XAPI_API_KEY` and the documented `~/.xapi/config.json` credential file.

### Impact Assessment

Successful exploitation could provide arbitrary code execution under the operating-system account running the agent. The accessible
...[truncated 551 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every invocation to an exact, reviewed package version:
    bash
    npx --yes xapi-to@<audited-version> <command>
    
  2. Do not use version ranges or mutable distribution tags such as latest.
  3. Prefer installation from a committed lockfile with integrity metadata rather than downloading executable code on every invocation.
  4. Verify npm provenance, publisher identity, package signatures where supported, and registry configuration before deployment.
  5. Re-audit the package before changing the pinned version.
  6. Run the CLI in a restricted environment with minimal filesystem access, network permissions, and environment variables.
  7. Provide the API credential only to commands that require it, rather than exposing it broadly to the agent process.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:217
Finding

API Key Is Embedded in a Payment URL

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 217–224 and 259
Vulnerability Type: Sensitive credential exposure through URL query parameters
Risk Level: Medium

Relevant code and documentation:

markdown
## Account Management

```bash
# Check balance
npx xapi-to balance

# Top up account
npx xapi-to topup --method stripe --amount 10
npx xapi-to topup --method x402
text

```markdown
- Note: `topup` command outputs a payment URL containing the API key as a query parameter — do not log or share this URL publicly

Technical Analysis

The documented topup operation emits a payment URL containing the API key in its query string. Query parameters are unsuitable for long-lived authentication secrets because URLs can be captured by multiple systems outside the application's direct control.

Potential disclosure locations include terminal transcripts, agent tool-call logs, command output archives, browser history, screenshots, clipboard managers, HTTP proxies, observability systems, and server access logs. Depending on redirect and referrer policy, the URL may also be disclosed through an HTTP Referer header.

The warning not to log or publicly share the URL acknowledges the exposure but does not prevent automatic logging or passive collection. The design should avoid placing the reusable API credential in the URL at all.

Attack Path

  1. A user or agent runs npx xapi-to topup --method stripe --amount 10.
  2. The command returns a payment URL whose query string contains the xapi API key.
  3. The output is retained by an agent transcript, terminal logger, monitoring system, browser history, proxy, screenshot, or another URL-processing component.
  4. An attacker or unauthorized operator obtains access to one of those records.
  5. The attacker extracts the API key from the query parameter.
  6. The attacker reuses the credential against xapi services until the key is revoked ...[truncated 704 chars]
Remediation
View remediation

Remediation Suggestions

  1. Never place the reusable API key in a URL path or query parameter.
  2. Have the authenticated backend generate a short-lived, single-use checkout token scoped only to the specific payment attempt.
  3. Ensure the checkout token cannot be used as an API credential and expires within a short period.
  4. Redact tokens and URLs from CLI output, agent transcripts, telemetry, exception messages, and application logs.
  5. Configure a restrictive referrer policy, such as Referrer-Policy: no-referrer, on payment pages as defense in depth.
  6. Prevent caches, analytics systems, and third-party page resources from retaining secret-bearing URLs.
  7. Rotate any API keys that have already appeared in generated payment URLs or logs.
  8. Document a credential-revocation procedure and monitor affected accounts for unexpected API usage.
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 (62)

Session Persistence

Medium
Category
Rogue Agent
Confidence
79% confidence
Finding

The skill is framed as a broad gateway to third-party APIs and is paired with setup that stores credentials persistently in ~/.xapi/config.json, enabling continued access across sessions. In combination with broad triggers and write-capable operations, this persistence increases the risk of repeated or unintended use of long-lived credentials beyond the immediate user request.

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"}}
---

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger description is overly broad, including generic situations like when the user mentions xapi, asks about available capabilities, or wants to call any third-party API. Such breadth increases the chance of unintended invocation, causing user data to be sent externally or privileged capabilities to be surfaced when a narrower local response would have been safer.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description advertises summarization, rewriting, chat, embeddings, search, and third-party API access, all of which may transmit user-provided content to external services, but it does not clearly warn users at the trigger level. This can lead to inadvertent disclosure of sensitive prompts, documents, or identifiers to remote providers without sufficiently informed consent.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill repeatedly instructs use of npx xapi-to without pinning a specific package version. Because npx fetches and executes the latest published package by default, a compromised maintainer account, malicious dependency update, or typosquat/package takeover could cause arbitrary code execution in the agent environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The setup section includes account registration and persistent API-key configuration even though the advertised purpose is general external data access and text processing. Encouraging registration and local credential storage by default creates unnecessary account creation, secret persistence, and privacy exposure beyond what users may expect from a simple lookup skill.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This invocation uses an unpinned npx package, which means the executed code can change over time without review. In an agent context, that creates a supply-chain execution path that may expose local files, environment variables, API keys, or execute arbitrary commands.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The package reference is not version-pinned, so the skill relies on mutable remote code execution at invocation time. If the upstream package or one of its dependencies is compromised, the agent may run attacker-controlled code with the user's privileges.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

Running npx xapi-to without a version allows silent drift to new code and creates a supply-chain risk. Since the tool handles secrets like XAPI_API_KEY and stores config under the home directory, compromise could directly lead to credential theft or host compromise.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This command executes an unpinned npm package via npx, exposing the environment to arbitrary upstream changes. In a skill that can access external services and local config, that substantially increases the blast radius of a supply-chain compromise.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill encourages dynamic execution of an unpinned package, which is a classic software supply-chain vulnerability. Any malicious update can be automatically trusted and executed by the agent at runtime.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

Because npx xapi-to is not pinned, the actual code executed is mutable and outside the repository's control. That undermines reviewability and allows compromise through package publication events rather than changes to the skill file itself.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This line contributes to a repeated pattern of executing remote npm code without version pinning. In an agent environment, that can result in arbitrary code execution, secret exfiltration, and persistence via modified config or workspace files.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

An unpinned npx package is effectively a moving target and bypasses stable security review. If an attacker publishes a malicious version, the agent could execute it while handling user requests and authenticated API operations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This command depends on unpinned remote code, introducing a preventable supply-chain execution risk. Since the skill handles API schemas, searches, and calls to third-party services, compromise could manipulate outputs or steal sensitive request data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The unpinned npm execution path allows arbitrary future code changes to run under agent privileges. This is especially dangerous because the skill also documents access to credentials and OAuth flows, which a malicious package could harvest.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

By not pinning the package version, the skill creates a trust-on-first-use execution channel every time the command runs. A compromised release could execute arbitrary code or tamper with returned data from external services.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This line is another instance of mutable runtime package execution through bare npx. In the context of an automation skill, that makes the skill behavior non-deterministic and vulnerable to upstream compromise.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The command invokes an unversioned package and therefore trusts whatever code is currently published to npm. Because the tool mediates calls to social, search, and AI services, compromise could alter data returned to the agent or leak prompts and credentials.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

An unpinned npx reference creates a software supply-chain vulnerability by allowing silent code changes between executions. In a skill with account access and config storage, an attacker could use this to exfiltrate secrets or modify persistent state.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This invocation continues the pattern of fetching executable code at runtime without a fixed version. That exposes the environment to arbitrary code execution and undermines any prior validation of the tool's behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

Because the package is not pinned, the command can execute newly published code without review. A malicious or compromised release could capture user input, modify requests, or access local secrets and files.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill relies on mutable package resolution through npx, which is unsafe for agent-executed workflows. Since the tool may process sensitive user text and external API traffic, compromise could impact confidentiality and integrity.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This is another true instance of unpinned package execution. The danger is amplified by the skill's broad capabilities, which include external requests, OAuth-related operations, and account-linked actions.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

A bare npx xapi-to command can resolve to different code over time and creates a direct path for supply-chain compromise. That may result in unauthorized actions, secret disclosure, or tampered outputs presented to the user.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This example still executes remote package code without constraining version or integrity. In a system intended for autonomous or semi-autonomous use, that significantly increases the chance of unnoticed compromise.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.