Back to skill

Security audit

Clawallex

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent USDC virtual-card payment skill, but it handles high-value payment credentials in ways users should review carefully before installing.

Review before installing. Use only with a dedicated, low-limit Clawallex API key, avoid entering secrets directly into chat or command-line history, do not use custom or HTTP base URLs with production credentials, rotate keys if they were logged, and keep the ~/.clawallex credential files protected or remove them when no longer needed.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/clawallex.py:216
Finding

Unrestricted API endpoint override can disclose authenticated financial requests

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/clawallex.py:949
Finding

API secrets are accepted through process-visible command-line arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose describes a user-facing financial capability: paying with USDC using virtual cards at online checkouts. However, the provided code chunk is only a test file. Its primary behavior is validating helper functions and setup routines in another module, including credentials handling, client ID persistence, request signing, and command-line setup responses. There is no implementation here for creating virtual cards, funding with USDC, processing payments, or interacting with checkout flows. While some tested endpoints/reference names suggest a payment/card API may exist elsewhere, this specific code chunk does not match the declared end-user purpose.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The skill documents persistent local storage of payment-service credentials at ~/.clawallex/credentials.json, which is a sensitive target for theft or misuse. Because these credentials can authorize wallet/card operations and card-data access flows, compromise of that file could enable unauthorized payments, account takeover, or access to encrypted sensitive card material.

Content

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

md
- **Wallet**: Your USDC balance. Funds all Mode A operations.
- **Mode A** (mode_code=100): Wallet balance deduction (default).
- **Mode B** (mode_code=200): x402 on-chain USDC payment for callers with self-custody wallets (agent or user). Two-stage (quote → sign → settle). Agent signs EIP-3009 independently; only the signature and wallet address are passed to Stage 2.
- **client_id**: The agent's stable identity, separate from the API Key. An agent can have multiple API Keys (for rotation/revocation), but `client_id` never changes. Cards and transactions are isolated per `client_id`. When switching to a new API Key, keep using the same `client_id` — the new key auto-binds on first request. Once bound, it cannot be changed (TOFU). Stored locally at `~/.clawallex/credentials.json`.

Credential Access

High
Category
Privilege Escalation
Confidence
78% confidence
Finding

The script stores API secrets persistently on disk in plaintext JSON. Although the file is created with 0600 permissions, the directory permissions are not explicitly hardened and plaintext secret storage remains risky on shared systems, backup systems, or compromised endpoints; in a payment-related skill this is more sensitive because the credentials authorize financial operations.

Content

Scanner excerpt · scripts/clawallex.py (reported line 57)May include surrounding context.

python
def save_credentials(creds):
    """Save credentials to ~/.clawallex/credentials.json with 0600 permissions."""
    os.makedirs(CREDENTIALS_DIR, exist_ok=True)
    fd = os.open(CREDENTIALS_FILE, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
    with os.fdopen(fd, "w") as f:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/clawallex.py (reported line 25)May include surrounding context.

python
import clawallex as cw

cw.CREDENTIALS_DIR = _tmpdir
cw.CREDENTIALS_FILE = os.path.join(_tmpdir, "credentials.json")
cw.CLIENT_IDS_FILE = os.path.join(_tmpdir, "client_ids.json")

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/clawallex.py (reported line 36)May include surrounding context.

python
import clawallex as cw

cw.CREDENTIALS_DIR = _tmpdir
cw.CREDENTIALS_FILE = os.path.join(_tmpdir, "credentials.json")
cw.CLIENT_IDS_FILE = os.path.join(_tmpdir, "client_ids.json")

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/test_clawallex.py (reported line 21)May include surrounding context.

python
import clawallex as cw

cw.CREDENTIALS_DIR = _tmpdir
cw.CREDENTIALS_FILE = os.path.join(_tmpdir, "credentials.json")
cw.CLIENT_IDS_FILE = os.path.join(_tmpdir, "client_ids.json")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README documents commands that save credentials and expose sensitive financial data such as API keys, wallet/account details, and card details including encrypted PAN/CVV, but it provides no security guidance on storage, access control, logging, or safe handling. In an agent-integrated payments skill, omission of these warnings increases the risk that developers or operators will mishandle secrets and card data, leading to credential compromise or unauthorized financial activity.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill explicitly directs use of a local Python script that performs network operations, reads account/card data, and stores credentials locally, yet it declares no tool restrictions. In an agent environment, missing permissions/allowed-tools broadens what the skill may invoke and weakens least-privilege controls, increasing the blast radius if the skill is misused or compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs the agent to solicit API key and secret material from the user and later states those credentials are saved locally, but it does not require an explicit warning, consent step, or handling constraints before collection. In an LLM-agent setting, asking for long-lived secrets without clear storage and privacy disclosure materially increases the risk of inadvertent exposure, unsafe retention, or collection through untrusted chat channels.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The signup flow retrieves API credentials from a remote service and immediately persists them locally without an explicit confirmation or warning. In an agent-skill context, this increases the chance that long-lived secrets are stored on disk unexpectedly, which can expand exposure if the host is multi-user, compromised, or the user did not intend persistent credential storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This code writes ~/.clawallex/client_ids.json but provides no confirmation prompt, logging, or visible disclosure at the write site. For code files, local file writes should have some user disclosure unless clearly covered elsewhere; unlike credential saving, this helper's docstring does not indicate that it persists data locally.

Content

No source excerpt is available for this finding.