Back to skill

Security audit

x402-compute

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this compute-related skill suspicious because it reports unsafe installation paths, credential and execution risks, and incomplete inspection, despite finding its capabilities broadly aligned with its purpose.

The verdict is suspicious, not a finding that the author is malicious. Consider the reported remote installer, credential handling, wallet-related execution risk, and data-disclosure gaps before installing; the review is incomplete, so unresolved behavior remains unassessed.

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
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (117)

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
90% confidence
Finding

Authentication to the default HTTPS service is expected, but the models command automatically attaches an environment-derived key to any supplied base URL, including plaintext HTTP or an unrelated host. Requests also follows redirects and does not automatically strip the custom X-API-Key header across origins, creating credential-disclosure paths if an untrusted endpoint or redirect is encountered.

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
90% confidence
Finding

The embedding request sends the automatically selected environment credential and user content to an unrestricted base URL without enforcing HTTPS or credential-origin binding. Exploitation requires an unsafe endpoint configuration or redirect, but in an agent workflow an externally suggested URL could consequently receive a reusable account credential and sensitive media.

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
90% confidence
Finding

The models request attaches a selected environment credential to an unrestricted base URL, allowing disclosure to an unrelated host or over plaintext HTTP if that endpoint is configured. Automatic redirects can also carry the custom X-API-Key header across origins; the transcription SDK's audio-sealing protections do not protect this separate request.

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 139, 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 97)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 42, 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 48)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 42, 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 174)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={"X-Payment": x_payment}, timeout=180, allow_redirects=False)
        except requests.RequestException:
            time.sleep(5 * (n + 1))

Tainted flow: 'BASE_URL' from os.getenv (line 42, 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 205)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 42, 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 356)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 109)May include surrounding context.

md
confidential).** See [AI Machines](#ai-machines--one-click-llm-gpu) below and `references/ai-machines.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 231)May include surrounding context.

md
M", "OpenRouter-ready endpoint" | `provision.py --model-id … --mode private` | `references/ai-machines.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 554)May include surrounding context.

md
deploy example → **`references/ai-machines.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 922)May include surrounding context.

md
- [references/ai-machines.md](references/ai-machines.md) — AI Machines (one-click LLM GPU: modes, endpoint+key, control API, agent x402 deploy)

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 917)May include surrounding context.

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

Instance destruction instructions omit a warning about losing hosted data.

High
Category
Output Handling
Confidence
91% confidence
Finding

The workflow recommends destroying the instance when finished without explaining that hosted data may become unrecoverable. In an agent-operated provisioning workflow, this omission can lead to premature cleanup of valuable state, although it does not demonstrate an authorization bypass or malicious deletion.

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 553)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 590)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 824)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**:

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 · references/agent-pods.md (reported line 238)May include surrounding context.

text
`GET /pods/<id>` returns a masked `credentials` block (the preinstalled skills' pod-scoped Compute
key + Studio PAT and its daily cap). Manage 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.

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 853)May include surrounding context.

-d '{"model":"agent-pod","stream":false,"messages":[{"role":"user","content":"Hello"}]}'

text
Keys are bound to the pod, carry a daily request cap (default 1000/day → `429` over-cap), and are
revocable (`DELETE /pods/<id>/api-keys/<keyId>`). Full body fields, response shapes, and error codes
→ **`references/agent-pods.md`**. Scripted end-to-end: `scripts/agent_pod.py` (`deploy` → `create-key`
→ `chat`).

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 · references/agent-pods-api.md (reported line 297)May include surrounding context.

md
- Ports 1024 to 65535 only. Ports the platform uses on the pod (8642, 8787, 18780 to 18799) are
  refused.
- At most 5 open ports per pod. `GET /ports` lists them (never the URLs).
  `DELETE /ports/{port}` closes one.
- Proxied requests: HTTP only, 5 MB per body, 30 second timeout, 600 requests per minute per pod.

### Clone a pod from its Vault backup

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 · references/agent-pods.md (reported line 26)May include surrounding context.

md
| Surface | Endpoints | Auth |
|---------|-----------|------|
| **Owner** (manage the pod) | `POST /pods`, `GET/PATCH /pods/{id}`, `POST /pods/{id}/actions`, `GET/POST/DELETE /pods/{id}/api-keys*`, wallet, credentials | **Compute auth** — `X-API-Key: x402c_…`, a signed compute session, or an `X-Auth-*` wallet signature. Required even when paying with x402, because a pod is owned by your wallet. |
| **Adapter** (talk to the agent) | `GET /pods/{id}/v1/models`, `POST /pods/{id}/v1/chat/completions` | **`Authorization: Bearer sk-sglpod-int-…`** — a pod-scoped integration key you mint via `POST /pods/{id}/api-keys`. NOT compute auth. |

The catalog (`GET /pods/catalog`) is public (no auth).

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 · references/agent-pods.md (reported line 275)May include surrounding context.

  • The raw key (sk-sglpod-int-…) is returned ONCE — store it. Only its SHA-256 hash is kept.
  • The key is bound to this pod; using it against a different pod fails as invalid_key.
  • Each key has a daily request cap (default 1000/day, rolling 24h window); over-cap → 429.
  • List: GET /pods/{id}/api-keys (masked). Revoke: DELETE /pods/{id}/api-keys/{keyId}.

4b. Call the adapter — Authorization: Bearer sk-sglpod-int-…

bash