Back to skill

Security audit

agenta-monero

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Monero wallet automation skill, but it needs review because its default local state handling can expose wallet credentials or affect unrelated processes on shared systems.

Install only after reviewing the local-host risks. Use an isolated single-user account or container, set MONERO_LOCK_DIR to a private non-shared directory, keep .env out of sync/backup/log capture, test on stagenet, and require explicit human approval for every mainnet send or sweep. Avoid using this on shared CI or multi-user machines until the runtime-directory and PID-validation issues are fixed.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
lib/rpc.sh:4
Finding

Predictable shared temporary directory enables credential exposure and file clobbering

Content
View full analysis
/dev/null || true NETRC_FILE="$dir/.netrc" local host; host=$(printf '%s' "${MONERO_RPC_URL:-}" | sed -E 's#^[a-z]+://##; s#[:/].*$##') : "${host:=127.0.0.1}" local user="${MONERO_RPC_USER:-}" pass="${MONERO_RPC_PASSWORD:-}" { printf 'machine %s\n' "$host" [[ -n "$user" ]] && printf 'login %s\n' "$user" [[ -n "$pass" ]] && printf 'password %s\n' "$pass" } > "$NETRC_FILE" chmod 600 "$NETRC_FILE" trap 'rm -f "$NETRC_FILE"' EXIT } ``` Related initialization: ```bash : "${MONERO_LOCK_DIR:=/tmp/agenta-monero}"; export MONERO_LOCK_DIR mkdir -p "$MONERO_LOCK_DIR"; chmod 700 "$MONERO_LOCK_DIR" 2>/dev/null || true ensure_netrc exec 200>"$MONERO_LOCK_DIR/agenta-monero.lock" ``` ### Technical Analysis The default runtime directory is the fixed, system-wide path `/tmp/agenta-monero`. The code uses `mkdir -p`, accepts an existing directory, and does not verify that the directory: - Is owned by the current user. - Is not a symbolic link. - Has the expected restrictive permissions. - Was created exclusively by the current process. - Does not contain attacker-created files or symbolic links. The initial `chmod 700` failure is explicitly ignored. The `.netrc` file is then opened using a normal shell redirection, which follows symbolic links and overwrites existing files. It contains the RPC username and password used to access a wallet RPC service capable of initiating wallet operations. Other files written under the same directory—including the lock, PID, port, log, and refresh timestamp files—are subject to the same unsafe trust boundary. ### Attack Path 1. A local attacker creates ...[truncated 1315 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/interactive_setup.sh:233
Finding

Wallet and RPC passwords are exposed through daemon command-line arguments

Content
View full analysis
"$LOG_FILE" 2>&1 & ``` ### Technical Analysis The setup script passes both the wallet password and generated RPC password directly in the `monero-wallet-rpc` argument vector: - `--password "$WALLET_PASSWORD"` - `--rpc-login "$RPC_USER:$RPC_PASSWORD"` Command-line arguments may be visible through process inspection facilities, system monitoring products, diagnostic tooling, audit logs, crash reports, or automation telemetry. The exact exposure depends on the operating system and process-visibility configuration, but same-account processes and privileged monitoring services commonly have access. Although the current setup JSON correctly avoids returning credentials to stdout, this command-line exposure creates a separate disclosure channel. ### Attack Path 1. A victim invokes `interactive_setup.sh`. 2. The script starts `monero-wallet-rpc` with both secrets embedded in its argument vector. 3. During or after startup, a same-host observer reads the process command line through process-listing or operating-system process metadata. 4. The observer extracts the wallet password and RPC username/password pair. 5. The RPC credentials can be used against the running wallet RPC endpoint if reachable. The wallet password may also be used with a copied or otherwise accessible wallet file. ### Impact Assessment Exposure of RPC credentials can authorize wallet operations for as long as those credentials remain valid. Depending on RPC reachability and wallet configuration, this may include ini ...[truncated 385 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/interactive_setup.sh:196
Finding

Force-mode setup can terminate an unrelated process using an untrusted PID file

Content
View full analysis
/dev/null || echo "") if [[ -n "$existing_pid" ]] && kill -0 "$existing_pid" 2>/dev/null; then if [[ "$FORCE" == true ]]; then kill "$existing_pid" 2>/dev/null || true sleep 1 kill -9 "$existing_pid" 2>/dev/null || true rm -f "$PID_FILE" "$PORT_FILE" ``` ### Technical Analysis When `--force` is supplied, the script trusts the PID read from `wallet-rpc.pid` and signals it before checking whether it actually identifies the managed `monero-wallet-rpc` process. The non-force branch later checks whether process arguments contain `wallet-rpc`, but that validation is not performed before the force-mode `SIGTERM` and `SIGKILL`. The PID is also not validated as a strictly numeric value, matched to the current user, associated with an expected executable, or tied to a recorded process start time. Because the PID file is stored in the predictable runtime directory identified in the first vulnerability, a local attacker may be able to replace it. A stale PID file can also become dangerous after operating-system PID reuse. ### Attack Path 1. An attacker gains write access to the runtime directory or exploits its predictable shared location. 2. The attacker writes the PID of another process owned by the victim into `wallet-rpc.pid`. 3. The victim runs `interactive_setup.sh --force`. 4. The script confirms only that some process exists at that PID. 5. It sends `SIGTERM`, waits one second, and then sends `SIGKILL` without verifying process identity. 6. The unrelated process is terminated with the privileges of the account running the Skill. A stale PID file can produce the same result without an active attacker if its PID has been reused by an unrelated process. ### Im ...[truncated 547 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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 (106)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · .gitignore (reported line 2)May include surrounding context.

text
# secrets / credentials
.env
*.netrc

# runtime artifacts

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · .gitignore (reported line 3)May include surrounding context.

text
# secrets / credentials
.env
*.netrc

# runtime artifacts
.last_refresh

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The review indicates the skill creates .netrc files as part of its operation, which is a credential storage mechanism and therefore a sensitive capability. In an agent environment, writing credentials to disk without strong boundaries or explicit disclosure increases the chance of local secret theft and lateral misuse.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 51)May include surrounding context.

md
Finding

The skill clearly performs shell execution and file writes, including creating `.env`, `.netrc`, PID files, and launching `monero-wallet-rpc`, yet no declared permissions are documented. In an agent setting this weakens security boundaries because operators may approve or invoke the skill without understanding that it can persist secrets and start local processes.

### Context-Inappropriate Capability

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Describing autonomous Monero transfers without a clear warning about irreversibility understates the financial risk of the skill. In an agent-driven payment context, users may overtrust automation and authorize workflows that can permanently transfer funds with no recovery path.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Documenting sweep_all without a visible warning is dangerous because the operation can transfer nearly all wallet funds in a single action. In this skill context, automation or prompt abuse could turn an ambiguous instruction into an unrecoverable full-balance transfer.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The test writes MONERO_WALLET_PASSWORD into a .env file and later loads it into environment state, normalizing plaintext secret handling in the codebase. Even if the sample value is fake, this pattern can be copied into production or leak real values through logs, fixtures, or developer workflows.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 204)May include surrounding context.

md
Content

@test "script_init exports MONERO_WALLET_PASSWORD from .env" {
  d="$(mktemp -d)"; printf 'MONERO_NETWORK="mainnet"\nMONERO_RPC_URL="http://127.0.0.1:18099"\nMONERO_LOCK_DIR="%s"\nMONERO_WALLET_PASSWORD="secret123"\n' "$(mktemp -d)" > "$d/.env"
  mkdir -p "$d/lib" "$d/scripts"
  cp "$LIB"/*.sh "$d/lib/"

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

This continuation of the test flow reinforces insecure handling by scripting secret loading from .env in an executable test harness. In agent and CI contexts, such examples can be replicated into unsafe operational patterns and increase accidental credential exposure.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 205)May include surrounding context.

md
Content

@test "script_init exports MONERO_WALLET_PASSWORD from .env" {
  d="$(mktemp -d)"; printf 'MONERO_NETWORK="mainnet"\nMONERO_RPC_URL="http://127.0.0.1:18099"\nMONERO_LOCK_DIR="%s"\nMONERO_WALLET_PASSWORD="secret123"\n' "$(mktemp -d)" > "$d/.env"
  mkdir -p "$d/lib" "$d/scripts"
  cp "$LIB"/*.sh "$d/lib/"
  cat > "$d/scripts/x.sh" <<'SH'

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

Echoing the wallet password in test output is an actual secret-leak pattern, even if the fixture uses a dummy value. In real pipelines, copied tests or parameterized runs can send sensitive values into CI logs, terminal scrollback, or artifact systems.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 224)May include surrounding context.

md
Finding

This test writes a wallet password to a temporary .env file, loads it into the environment, and then echoes the secret into test output. Even though the value is a dummy test password, the pattern normalizes unsafe secret-handling behavior and could leak real credentials if the test is adapted, copied, or run with non-test values in CI logs or developer consoles.

### Credential Access

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The explicit NETRC_FILE assignment shows the skill uses a .netrc file path for credentials, which is a real credential-handling surface. In a cryptocurrency wallet workflow, local credential disclosure can materially increase the risk of unauthorized wallet access or supporting-service compromise.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 236)May include surrounding context.

md
Content

NETRC_FILE="$dir/.netrc"

Confidence

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

The matched token '/.netrc' by itself is not sufficient to prove a separate vulnerability beyond the already identified credential-file usage. This is likely duplicate evidence of the same underlying issue rather than a distinct exploitable condition.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 244)May include surrounding context.

md
Finding

/.netrc

### Credential Access

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The documented step to write a .env file is a real secret-persistence mechanism when used for wallet credentials. In the context of a Monero payment skill, plaintext on-disk secret storage materially raises the stakes because exposure can lead to unauthorized financial operations.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 256)May include surrounding context.

md
Content

# --- Write .env ---

Confidence

Credential Access

High
Category
Privilege Escalation
Confidence
76% confidence
Finding

The bare '.env' token alone is likely duplicate evidence rather than a separate vulnerability distinct from the documented .env secret-storage behavior. The real issue is the persistence and possible exposure of sensitive wallet credentials, already captured elsewhere.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 264)May include surrounding context.

md
Finding

.env

### Credential Access

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The test definition again demonstrates .env-based wallet password handling, which is a sensitive pattern in a financial tool. Repetition in tests increases the chance developers regard plaintext secret loading as acceptable default practice.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 276)May include surrounding context.

md
Content

@test "script_init exports MONERO_WALLET_PASSWORD from .env" {

Confidence

Credential Access

High
Category
Privilege Escalation
Confidence
72% confidence
Finding

This appears to be another duplicate .env token match rather than an independently actionable flaw. It supports the broader credential-persistence concern but does not add a materially distinct exploit path on its own.

Content

Scanner excerpt · Agenta-Monero Security Review.md (reported line 284)May include surrounding context.

md
Finding

.env"

### Tool Parameter Abuse

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The README instructs users to store wallet RPC credentials and the Monero wallet password in a local .env file. Even with chmod 600, plaintext secrets in agent workspaces, CI environments, backups, or shared systems can be exposed, and possession of these credentials can enable unauthorized wallet access and irreversible fund transfers.

Content

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

Copy .env.example to .env and fill in your values:

bash
cp .env.example .env

Required variables:

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

Persisting MONERO_WALLET_PASSWORD and RPC credentials in .env creates a high-value secret file tied directly to a wallet capable of moving funds. In the context of a payment skill with send and sweep capabilities, theft of this file can plausibly lead to full wallet compromise and irreversible loss of cryptocurrency.

Content

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

md
permissions:
    shell_execution: true
    file_writes:
      - ".env (chmod 600) — RPC credentials + wallet password"
      - "$MONERO_LOCK_DIR/.netrc (chmod 600) — ephemeral RPC auth"
      - "$MONERO_LOCK_DIR/wallet-rpc.pid — process tracking"
      - "$MONERO_LOCK_DIR/wallet-rpc.port — port tracking"

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The skill creates an on-disk .netrc containing RPC credentials, which materially expands the credential theft surface. In an agent workspace, CI runner, or multi-user host, another process or user with filesystem read access could recover those credentials and interact with the wallet RPC, potentially enabling unauthorized wallet actions.

Content

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

md
shell_execution: true
    file_writes:
      - ".env (chmod 600) — RPC credentials + wallet password"
      - "$MONERO_LOCK_DIR/.netrc (chmod 600) — ephemeral RPC auth"
      - "$MONERO_LOCK_DIR/wallet-rpc.pid — process tracking"
      - "$MONERO_LOCK_DIR/wallet-rpc.port — port tracking"
      - "$MONERO_LOCK_DIR/.last_refresh — refresh timestamp"

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The declared credential access confirms the skill can read wallet and RPC secrets as part of normal operation. Given that the same skill also manages wallet operations and background RPC processes, compromise of the skill runtime effectively becomes compromise of the funds under management.

Content

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

md
- "$MONERO_LOCK_DIR/.last_refresh — refresh timestamp"
    process_management: "starts/stops monero-wallet-rpc as a background process"
    network_access: "HTTP POST to $MONERO_RPC_URL/json_rpc (localhost by default)"
    credential_access: "reads .env for RPC + wallet credentials; writes .netrc for curl auth"
---

# Agenta-Monero

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The declared credential access confirms the skill can read wallet and RPC secrets as part of normal operation. Given that the same skill also manages wallet operations and background RPC processes, compromise of the skill runtime effectively becomes compromise of the funds under management.

Content

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

md
- "$MONERO_LOCK_DIR/.last_refresh — refresh timestamp"
    process_management: "starts/stops monero-wallet-rpc as a background process"
    network_access: "HTTP POST to $MONERO_RPC_URL/json_rpc (localhost by default)"
    credential_access: "reads .env for RPC + wallet credentials; writes .netrc for curl auth"
---

# Agenta-Monero

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The capability table confirms that the skill both stores credentials on disk and uses them operationally. Because this skill can initiate irreversible cryptocurrency transfers, any credential leakage can translate into direct financial loss rather than mere account misuse.

Content

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

md
| Capability | Details |
|------------|---------|
| **Shell execution** | Runs `curl`, `jq`, `flock`, `monero-wallet-rpc`, and standard shell utilities |
| **File writes** | `.env` (chmod 600), `.netrc` (chmod 600, ephemeral), PID/port files, lock files, refresh timestamp |
| **Process management** | Starts and stops `monero-wallet-rpc` as a background daemon (PID tracked in `$MONERO_LOCK_DIR`) |
| **Network access** | HTTP POST to `$MONERO_RPC_URL/json_rpc` (localhost by default; can be configured for remote) |
| **Credential access** | Reads `.env` for RPC user/password and wallet password; writes `.netrc` for curl auth; never emits credentials in stdout |

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

Although the file documents restrictive permissions and says credentials are not printed, it still normalizes local plaintext secret storage and access by the skill. The controls reduce risk, but they do not eliminate exposure from local compromise, backup leakage, malicious co-tenant access, or other workspace-level reads.

Content

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

md
| **File writes** | `.env` (chmod 600), `.netrc` (chmod 600, ephemeral), PID/port files, lock files, refresh timestamp |
| **Process management** | Starts and stops `monero-wallet-rpc` as a background daemon (PID tracked in `$MONERO_LOCK_DIR`) |
| **Network access** | HTTP POST to `$MONERO_RPC_URL/json_rpc` (localhost by default; can be configured for remote) |
| **Credential access** | Reads `.env` for RPC user/password and wallet password; writes `.netrc` for curl auth; never emits credentials in stdout |

All credential files are created with restrictive permissions (`0600` for files, `0700` for the lock directory). The `.env` file is parsed safely (never sourced) and shell metacharacters are rejected.

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The design choice to use .netrc instead of curl -u avoids command-line leakage, but it still places credentials in a readable file on disk. That tradeoff may be acceptable operationally, yet it remains a real credential exposure risk in shared or insufficiently isolated environments.

Content

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

md
- **`validate_address` uses real RPC fields.** The RPC is called with `any_net_type:true` so the real `nettype` is returned; `network_match` is derived client-side by comparing `nettype` to `MONERO_NETWORK`. There is **no `checksum_valid` field** (the checksum is part of `valid`). This keeps `INVALID_ADDRESS` (bad format/checksum) distinct from `NETWORK_MISMATCH` (valid but wrong network).
- **Money is integer piconeros (1 XMR = 10^12).** Never use floating-point for amounts. All arithmetic is integer piconero; the XMR decimal strings in output come from the scripts' string-based conversion. Amounts must be positive and have <=12 decimals.
- **Sends and sweeps are not idempotent and are NOT auto-retried.** On timeout/uncertain result, check `get_transfer.sh --tx-hash` **before** retrying (see retry-safety workflow). Use `--dry-run` / `estimate_fee` to preview.
- **Credentials use netrc (never `curl -u`); `.env` is parsed, never sourced.** The netrc lives at `$MONERO_LOCK_DIR/.netrc` (mode `0600`). All user values are passed to the RPC via `jq --arg`/`--argjson` — never by string interpolation.

## Workflows

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

The documentation instructs storing Monero wallet RPC credentials in a plaintext .env file. Even with chmod 600, plaintext local secret storage creates exposure risk through backups, shell/editor history, accidental copies, or compromise of the user account; in this skill context, those credentials can authorize wallet RPC operations including sending funds.

Content

Scanner excerpt · docs/GETTING_STARTED.md (reported line 200)May include surrounding context.

OpenClaw:

cd ~/.openclaw/workspace/skills/finance/agenta-monero

cp .env.example .env chmod 600 .env

text

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

The act of copying .env.example to .env and populating it with RPC username/password operationalizes persistent credential storage in the skill directory. In a cryptocurrency wallet skill, compromise of these credentials can enable unauthorized RPC access to wallet operations, making the context more sensitive than ordinary application secrets.

Content

Scanner excerpt · docs/GETTING_STARTED.md (reported line 201)May include surrounding context.

cd ~/.openclaw/workspace/skills/finance/agenta-monero

cp .env.example .env chmod 600 .env

text

Edit `.env` — set at least these:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · lib/config.sh (reported line 2)May include surrounding context.

sh
#!/usr/bin/env bash
# Safe .env parser. NEVER sources the file.
declare -gA CONFIG 2>/dev/null || declare -A CONFIG

_parse_env_fail() { echo "CONFIG_INVALID: $1" >&2; return 1; }