Back to skill

Security audit

x402-compute

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because it reports a Solana payment authorization weakness and an installer that runs a mutable remote script, alongside other security and safety concerns.

The scanner reports meaningful payment, installation, credential-handling, and destructive-action risks, and its analysis was incomplete. Consider avoiding installation until the Solana payment path and remote installer are independently reviewed, dependency versions are pinned, and relevant references receive a complete scan.

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
scripts/solana_signing.py
Finding

Quote-controlled Solana mint bypasses USDC payment authorization

Content
View full analysis

Impact

The signed transaction can transfer another six-decimal SPL token to the quote-selected recipient. Its actual economic value need not match the displayed USDC amount or dollar cap. If needed, setup also spends SOL on account creation and fees. A quote provider receiving a fully signed transaction can submit it directly; application-level payment rejection is not a sufficient asset guard.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (121)

Tainted flow: 'key' from os.getenv (line 222, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/agent_pod.py (reported line 229)May include surrounding context.

python
{"model": "agent-pod", "stream": False, "messages": [{"role": "user", "content": message}]},
        separators=(",", ":"),
    )
    resp = requests.post(
        f"{BASE_URL}/pods/{pod_id}/v1/chat/completions",
        data=body_json,
        headers={"Content-Type": "application/json", "Authorization": f"Bearer {key}"},

Tainted flow: 'headers' from os.environ.get (line 183, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The models request automatically attaches an environment-derived API key to an unrestricted --base-url, even though listing models can proceed without authentication. An attacker who influences the agent's command arguments can redirect the credential to their server, and an HTTP URL would also expose it in transit.

Content

Scanner excerpt · scripts/grid_embeddings.py (reported line 184)May include surrounding context.

python
def list_models(base_url: str, key: str | None) -> int:
    headers = {"X-API-Key": key} if key else {}
    response = requests.get(
        f"{base_url.rstrip('/')}/v1/models",
        params={"type": "embedding"},
        headers=headers,

Tainted flow: 'key' from os.environ.get (line 206, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

Embedding requests send an automatically selected SGL or compute API key and the request content to an unrestricted --base-url. If an attacker steers the agent into using a malicious endpoint, both credentials and submitted media or text can be disclosed; the code also accepts plaintext HTTP.

Content

Scanner excerpt · scripts/grid_embeddings.py (reported line 209)May include surrounding context.

python
key = api_key(args.api_key)
    if not key:
        raise InputError("Set COMPUTE_API_KEY or SGL_API_KEY, or pass --api-key. Use --dry-run without credentials.")
    response = requests.post(
        f"{args.base_url.rstrip('/')}/v1/embeddings",
        data=raw,
        headers={"Content-Type": "application/json", "X-API-Key": key},

Tainted flow: 'headers' from os.environ.get (line 111, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

Model discovery attaches an automatically selected environment API key to any supplied base URL without checking its origin or requiring HTTPS. Attacker-influenced command arguments can therefore leak a compute or Grid credential even though this operation is described as read-only.

Content

Scanner excerpt · scripts/grid_transcription.py (reported line 112)May include surrounding context.

python
def list_models(base_url: str, key: str | None) -> int:
    headers = {"X-API-Key": key} if key else {}
    response = requests.get(
        f"{base_url.rstrip('/')}/v1/models",
        params={"type": "transcription"},
        headers=headers,

Tainted flow: 'params' from os.getenv (line 142, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/solana_signing.py (reported line 100)May include surrounding context.

python
def _rpc_call(method: str, params: list[Any]) -> Dict[str, Any]:
    response = requests.post(
        RPC_URL,
        json={"jsonrpc": "2.0", "id": 1, "method": method, "params": params},
        timeout=30,

Tainted flow: 'BASE_URL' from os.getenv (line 44, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/train_x402.py (reported line 50)May include surrounding context.

python
def catalog() -> dict:
    r = requests.get(f"{BASE_URL}/training/x402/catalog", timeout=30, allow_redirects=False)
    if r.status_code != 200:
        return {"error": f"catalog returned {r.status_code}", "response": r.text[:500]}
    return r.json()

Tainted flow: 'BASE_URL' from os.getenv (line 44, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/train_x402.py (reported line 176)May include surrounding context.

python
# was consumed by the quote.
    for n in range(attempts):
        try:
            return requests.post(f"{BASE_URL}/training/x402/runs", json=body,
                                 headers={header_name: x_payment}, timeout=180, allow_redirects=False)
        except requests.RequestException:
            time.sleep(5 * (n + 1))

Tainted flow: 'BASE_URL' from os.getenv (line 44, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/train_x402.py (reported line 207)May include surrounding context.

python
chain="solana" if network == "solana" else "base")
    except Exception as exc:
        return {"error": f"Failed to sign the quote request: {exc}"}
    q = requests.post(f"{BASE_URL}/training/x402/runs", data=body_json,
                      headers={"Content-Type": "application/json", **auth_headers}, timeout=60, allow_redirects=False)
    if q.status_code != 402:
        return {"error": f"expected a 402 quote, got {q.status_code}", "response": q.text[:800]}

Tainted flow: 'BASE_URL' from os.getenv (line 44, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/train_x402.py (reported line 363)May include surrounding context.

python
def status(quote_id: str, claim_token: str) -> dict:
    r = requests.get(
        f"{BASE_URL}/training/x402/orders/{quote_id}",
        headers={"Authorization": f"Bearer {claim_token}"},
        timeout=30,

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
on.py` / `extend_instance.py` / `resize_instance.py` / `destroy_instance.py` | `references/api-reference.md` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| "run inference on the grid", "confidential/TEE OpenAI-compatible inference" | curl / any OpenAI SDK → `grid.x402compute.cc` | `references/api-reference.md` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- [references/api-reference.md](references/api-reference.md)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
e 24h agent trial" | **`agent_pod.py deploy`** (or `catalog`/`list`/`get`) | **`references/agent-pods.md`** |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
for my agent pod" | **`agent_pod.py create-key` then `agent_pod.py chat`** | **`references/agent-pods.md`** |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
y templates`** then **`agent_pod.py deploy --template community-manager`** | **`references/agent-pods.md`** |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
so use Singularity Layer models, billed per call from credits). BYOK only. See `references/agent-pods.md`.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
→ **`references/agent-pods.md`**. Scripted end-to-end: `scripts/agent_pod.py` (`deploy` → `create-key`

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- [references/agent-pods.md](references/agent-pods.md) — Agent Pods (deploy `POST /pods`, manage, wallet, and the OpenAI-compatible adapter: `sk-sglpod-int-*` k

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
s, ports, clone). Use it when the caller holds an `x402c_…` key and no wallet; `agent-pods.md` remains the signature/OWS path.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
`npx @singularity-layer/agentvault`** (`login`, `backup --all`, `restore`) | **`references/agent-vault.md`** |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Full flows, HTTP API, and agent safety rules: `references/agent-vault.md`.

The instance-destruction workflow lacks a warning about loss of instance-local data.

High
Category
Output Handling
Confidence
88% confidence
Finding

The agent-facing destruction workflow presents an immediately executable destroy command without requiring confirmation of the target or warning about loss of instance-local data. This is a documentation-level safety gap that could contribute to irreversible data loss, although the supplied file does not establish whether the underlying script has its own confirmation safeguards.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
Control API: `POST /compute/provision` (add `model_id`+`mode`; base fields `plan`,`region`,`os_id`),
`GET /compute/instances`, `GET /compute/instances/:id`, `POST /compute/instances/:id/extend`,
`POST /compute/instances/:id/resize`, `POST /compute/instances/:id/password`,
`DELETE /compute/instances/:id`, `POST /compute/credits/topup`. Full detail + the end-to-end agent
deploy example → **`references/ai-machines.md`**.

---

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
# Top up credits in the dashboard: Settings → Credits (cloud.x402compute.cc).

# 2) Check what's being served + whether the grid has capacity
curl https://grid.x402compute.cc/v1/models -H "X-API-Key: $COMPUTE_API_KEY"
curl https://grid.x402compute.cc/grid/capacity            # active_nodes, models, at_capacity

# 3) OpenAI-compatible chat (billed to credits)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

POST /pods//wallet/send {chain, to, token, amount, idempotency_key}

POST /pods//wallet/x402/pay {url, method?, headers?, body?, max_amount_usd?}

text
`GET /pods/<id>` returns a masked `credentials` block — the preinstalled skills' pod-scoped Compute key + Studio PAT (for the marketplace / MCP) and its daily cap. Manage it with `POST /pods/<id>/credentials` (`{"action":"enable"|"regenerate"|"set-cap"|"byok", ...}`) or `DELETE /pods/<id>/credentials` to revoke. Delegated creds, native Singularity MCP, wallet sending, and memory are **feature-gated** and may be dark until launch.

### Extend / destroy
A pod is a compute order, so use the **Machines endpoints with the pod id as the instance id**: