Back to skill

Security audit

NEXUS Code Review

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed remote code-review service, but its automatic-use and cryptocurrency payment flow need careful review before installation.

Install only if you are comfortable sending code to NEXUS and using its paid crypto-payment workflow. Use sandbox mode for testing, avoid submitting secrets or private source unless approved, and require manual confirmation plus local amount, recipient, asset, and network checks before any wallet signs or submits a transaction.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:57
Finding

Unvalidated Server-Directed Cryptocurrency Payment

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 57–63; related automatic-invocation behavior is documented in README.md, line 21
Vulnerability Type: Unvalidated payment authorization
Risk Level: Medium

Vulnerable Code Snippet:

markdown
1. Call the service endpoint without payment headers.
2. Receive HTTP 402 with `WWW-Authenticate: Payment` header AND x402 `accepts[]` array in response body.
3. Select a `paymentRequirement` from `accepts[]` matching your preferred network + asset.
4. Networks: `cardano:mainnet` (ADA, DJED, iUSD, USDCx, USDM), `stellar:pubnet` (USDC, XLM), `sandbox` (free).
5. Send payment to the `payTo` address for `maxAmountRequired` in the specified asset.
6. **Stellar fee sponsorship:** POST your signed XDR to `https://ai-service-hub-15.emergent.host/api/mpp/stellar/sponsor` — NEXUS pays gas, you need 0 XLM.
7. Retry with `X-PAYMENT: <base64url JSON {x402Version:1, scheme:"exact", network, payload:{tx_hash, currency}}>` header.

Related invocation behavior:

markdown
This skill is automatically invoked by your OpenClaw agent when a matching task is detected.

Technical Analysis

The payment workflow instructs an agent to use the remote server's payTo and maxAmountRequired values without requiring independent validation against trusted local policy. Although the documentation advertises a price of $0.25/request, the workflow does not specify a locally enforced maximum, a pinned recipient address, an approved asset and network allowlist, challenge-expiration checks, replay protection, or mandatory user confirmation before payment.

The same remote service also receives signed Stellar XDR data for fee sponsorship. A signed transaction should be treated as security-sensitive authorization material and must be verified locally to ensure that its operations, destination, asset, amount, memo, sequence number, and network match the user's intent before ...[truncated 2056 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit, transaction-specific user approval before constructing, signing, or submitting any paid transaction. Automatic skill selection must never imply payment consent.
  2. Enforce a local maximum charge equal to the advertised price or a separately configured user budget. Reject missing, malformed, zero, negative, or excessive amounts.
  3. Pin trusted recipient addresses locally for each supported chain and reject a challenge whose payTo value does not match the configured recipient.
  4. Maintain explicit allowlists for supported networks, chain identifiers, assets, token issuers or policy IDs, and payment schemes.
  5. Present the recipient, amount, fiat equivalent, asset, network, fees, and all transaction operations to the user before signing.
  6. Fully decode and validate Stellar XDR before signing or submitting it. Confirm the network passphrase, source account, sequence number, time bounds, operation types, destination, amount, asset issuer, memo, and fee structure.
  7. Bind each payment challenge to the intended request using an authenticated request identifier, nonce, expiration time, and server signature. Reject expired or replayed challenges and credentials.
  8. Separate service discovery from payment authorization. Treat all HTTP 402 response fields as untrusted input even when received over TLS.
  9. Apply per-request and cumulative spending limits at the wallet or signer layer so the skill cannot override them.
  10. Document failure behavior explicitly: any recipient, amount, asset, network, or transaction mismatch must abort the operation without payment.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 16)May include surrounding context.

Or manually copy the SKILL.md to your OpenClaw skills directory:

bash
cp SKILL.md ~/.openclaw/skills/nexus-code-review/SKILL.md

Usage

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README says the skill is automatically invoked and provides examples that send an "input" payload to a remote HTTPS endpoint, but it does not clearly warn that user prompts, code, or potentially sensitive repository contents may be transmitted to a third-party service. In an agent-skill context, that omission can lead to unintentional exfiltration of proprietary source code, secrets, or regulated data during normal use.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The README explicitly instructs users to POST data to an external service endpoint, confirming that skill input leaves the local environment. In the context of a code-review skill, the transmitted input is likely to include source code or security-sensitive material, creating a real confidentiality risk if users are not warned, if transport destinations are not vetted, or if the service stores submitted content.

Content

Scanner excerpt · README.md (reported line 29)May include surrounding context.

bash
# Step 1: Get the x402/MPP challenge
curl -X POST https://ai-service-hub-15.emergent.host/api/original-services/code-review \
  -H "Content-Type: application/json" \
  -d '{"input": "your query here"}'
# Returns 402 + WWW-Authenticate: Payment header

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The skill explicitly instructs agents to transmit user-supplied code and a payment proof token to an external third-party service over the network. This is a real data-exfiltration/privacy risk because reviewed code may contain proprietary source, secrets, or sensitive business logic, and the markdown's assurances about storage and trust are unverified and should not be relied upon.

Content

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

API Call

bash
curl -X POST https://ai-service-hub-15.emergent.host/api/original-services/code-review \
  -H "Content-Type: application/json" \
  -H "X-Payment-Proof: $NEXUS_PAYMENT_PROOF" \
  -d '{"code": "def login(user, pwd): ..."}'