Back to skill

Security audit

agenta-monero

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Monero wallet/payment skill that can move real funds, but its high-risk actions and credential handling are aligned with its purpose and mostly gated or documented.

Install only in a private, single-user environment. Keep wallet RPC bound to localhost or protected by HTTPS, never commit or back up the .env file with real secrets, test on stagenet first, and require human review before any --confirm send or sweep_all operation.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (26)

Vague Triggers

Medium
Confidence
90% confidence
Finding
The trigger phrase 'Set up Monero payments' is overly broad for a skill that initializes wallet infrastructure and handles sensitive payment configuration. In an agent environment, broad triggers increase the chance of accidental invocation or abuse via prompt steering, which is especially risky because the skill prepares systems capable of moving real funds.

Missing User Warnings

High
Confidence
96% confidence
Finding
The skill description promotes autonomous Monero payment actions without prominently warning that blockchain transfers are irreversible and can cause permanent financial loss. In this context, missing warnings materially increase the likelihood of unsafe operator expectations and accidental agent-driven transfers.

Missing User Warnings

High
Confidence
97% confidence
Finding
A sweep-all operation can transfer nearly the entire wallet balance, yet the documentation snippet lacks a clear caution about draining funds. In a payment automation skill, that omission makes accidental or maliciously induced full-balance transfers much more dangerous.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The documentation instructs users to store the wallet password in a persistent .env file without strong warning about long-term secret exposure through backups, shared workspaces, or local compromise. Because this skill manages cryptocurrency wallets, persistent plaintext secret storage materially raises the risk of theft.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The README includes a broad natural-language instruction telling an agent to 'Set up the Agenta-Monero skill.' In an agentic environment, such phrases can trigger installation, configuration, wallet initialization, or credential-handling actions without sufficiently scoped user confirmation, which is especially risky for a financial skill tied to irreversible cryptocurrency operations.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The code will send wallet RPC requests to whatever MONERO_RPC_URL is configured, and it only applies TLS trust settings when the URL is HTTPS. If MONERO_RPC_URL uses plain HTTP, wallet commands, metadata, and authentication exchanges may be exposed to interception or manipulation, which is especially sensitive in a cryptocurrency wallet context where remote RPC controls payment and wallet operations.

External Transmission

Medium
Category
Data Exfiltration
Content
[[ -n "${MONERO_RPC_SSL_CACERT:-}" ]] && args+=(--cacert "$MONERO_RPC_SSL_CACERT")
    [[ -n "${MONERO_RPC_SSL_CAPATH:-}" ]] && args+=(--capath "$MONERO_RPC_SSL_CAPATH")
  }
  curl "${args[@]}" -d "$body"
}

rpc_call() {
Confidence
95% confidence
Finding
This line performs the actual outbound transmission of wallet RPC requests to the configured endpoint. In the context of a Monero payment skill, that traffic can include sensitive wallet operations and authentication material; if directed to an untrusted or plaintext endpoint, it could enable transaction manipulation, privacy loss, or unauthorized wallet actions.

Credential Access

High
Category
Privilege Escalation
Content
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
Confidence
79% confidence
Finding
The review text indicates the skill creates .netrc and .env files and persists credentials without declared permissions or clear boundaries. Persisting authentication material in local files increases exposure to other local users, compromised workspaces, backups, and log collection, especially in agent environments.

Credential Access

High
Category
Privilege Escalation
Content
Content

NETRC_FILE="$dir/.netrc"

Confidence
Confidence
90% confidence
Finding
Defining a NETRC_FILE path indicates the skill uses a .netrc file for credentials, which can expose sensitive authentication material if stored unencrypted or in agent-accessible workspaces. In this wallet-management context, credential leakage can facilitate unauthorized RPC access and fund movement.

Credential Access

High
Category
Privilege Escalation
Content
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/"
Confidence
95% confidence
Finding
The test writes a wallet password into a .env file, normalizing plaintext secret storage in source-controlled or CI-executed workflows. Even with dummy test data, such patterns are risky because they are easily copied into production paths and may leak if adapted with real credentials.

Credential Access

High
Category
Privilege Escalation
Content
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
Confidence
97% confidence
Finding
The described test behavior loads a wallet password from .env and echoes it to output, which is dangerous because CI logs and developer consoles are often broadly accessible and retained. In a crypto wallet skill, exposing even local service secrets can enable unauthorized wallet actions if the RPC endpoint is reachable.

Credential Access

High
Category
Privilege Escalation
Content
Content

# --- Write .env ---

Confidence
Confidence
90% confidence
Finding
The explicit step to write a .env file suggests intentional persistence of sensitive wallet configuration and possibly passwords in plaintext. In an agent-operated payment system, plaintext secret files increase blast radius through filesystem compromise, artifact collection, and accidental disclosure.

Credential Access

High
Category
Privilege Escalation
Content
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"
Confidence
88% confidence
Finding
The skill writes RPC authentication material to `$MONERO_LOCK_DIR/.netrc`, creating a local credential file that can be abused by other processes or users with workspace access to control the wallet RPC. In a cryptocurrency payment skill, credential compromise can directly enable unauthorized transfers, wallet inspection, or full fund drain depending on RPC exposure and wallet state.

Credential Access

High
Category
Privilege Escalation
Content
- "$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
Confidence
91% confidence
Finding
The declared `credential_access` confirms the skill reads `.env` for wallet and RPC credentials. This is dangerous because any local compromise of the workspace or logs/backups containing `.env` can expose secrets that protect real cryptocurrency funds.

Credential Access

High
Category
Privilege Escalation
Content
| 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 |
Confidence
90% confidence
Finding
The capability table confirms the skill writes `.env` and `.netrc` containing authentication secrets. Because this skill can initiate irreversible Monero transfers, compromise of those files has unusually direct financial consequences compared with ordinary application credentials.

Credential Access

High
Category
Privilege Escalation
Content
| **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.
Confidence
89% confidence
Finding
Although the text says credentials are not emitted to stdout, it still confirms the skill reads wallet passwords and writes curl auth material to disk. Suppressing stdout leakage helps, but does not mitigate local disclosure risk from persistent secret files in an agent workspace.

Credential Access

High
Category
Privilege Escalation
Content
- **`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
Confidence
86% confidence
Finding
The design note that 'credentials use netrc' confirms an implementation choice to place RPC auth in a file. Even with `0600` permissions and safe argument passing, disk-resident credentials remain a meaningful target in shared, CI, or compromised agent environments, especially where wallet operations can move funds irreversibly.

Credential Access

High
Category
Privilege Escalation
Content
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"
Confidence
92% confidence
Finding
Storing `RPC credentials + wallet password` in `.env` is a real vulnerability because it places spending secrets for a Monero wallet in plaintext on disk. In the context of an autonomous payment skill, theft of this file can plausibly give an attacker enough access to inspect balances, operate the RPC, and initiate unauthorized transfers or sweeps.

Credential Access

High
Category
Privilege Escalation
Content
- "$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
Confidence
91% confidence
Finding
The declared `credential_access` confirms the skill reads `.env` for wallet and RPC credentials. This is dangerous because any local compromise of the workspace or logs/backups containing `.env` can expose secrets that protect real cryptocurrency funds.

Credential Access

High
Category
Privilege Escalation
Content
RPC_USER=$(gen_random 12)
RPC_PASSWORD=$(gen_random 24)

# --- Resolve .env path ---
ENV_FILE="$SCRIPT_DIR/../.env"

if [[ -f "$ENV_FILE" && "$FORCE" != true ]]; then
Confidence
86% confidence
Finding
The script stores the wallet password and generated RPC credentials in a plaintext `.env` file on disk. Although it later applies `chmod 600` and avoids printing credentials to stdout, plaintext secret persistence increases exposure through backups, local compromise, accidental commits, or other processes/users with access to the account. In a cryptocurrency wallet-management skill, compromise of these secrets can enable unauthorized wallet RPC access and potentially fund theft.

Credential Access

High
Category
Privilege Escalation
Content
RPC_PASSWORD=$(gen_random 24)

# --- Resolve .env path ---
ENV_FILE="$SCRIPT_DIR/../.env"

if [[ -f "$ENV_FILE" && "$FORCE" != true ]]; then
  printf '%s' ".env already exists at $ENV_FILE — overwrite? [y/N] " >&2
Confidence
86% confidence
Finding
Resolving `ENV_FILE` to `../.env` within the project tree contributes to a real secret-handling risk because the script is preparing to write wallet and RPC credentials to a predictable plaintext file. In this Monero payment context, those credentials are highly sensitive and could facilitate unauthorized wallet operations if exposed.

Credential Access

High
Category
Privilege Escalation
Content
[[ "$answer" =~ ^[yY] ]] || json_error "CONFIG_INVALID" "setup cancelled by user"
fi

# --- Write .env ---
cat > "$ENV_FILE" <<EOF
# === Monero Wallet RPC Connection ===
MONERO_RPC_URL="http://127.0.0.1:$RPC_PORT"
Confidence
93% confidence
Finding
This is the point where the script writes the wallet password and RPC credentials into a plaintext `.env` file. In a Monero wallet-management skill, those secrets are materially dangerous: exposure can allow remote wallet RPC authentication and access to the wallet, potentially enabling theft, transaction manipulation, or privacy loss. The context increases severity because the asset being protected is cryptocurrency and the wallet password is especially sensitive.

Credential Access

High
Category
Privilege Escalation
Content
[[ -n "$pid" ]] && kill "$pid" 2>/dev/null || true

  # Verify .env was written
  [[ -f "$skill_copy/.env" ]]
  local env_contents
  env_contents=$(cat "$skill_copy/.env")
  [[ "$env_contents" == *"MONERO_NETWORK=\"stagenet\""* ]]
Confidence
81% confidence
Finding
This test reads the generated `.env` contents and explicitly asserts that `MONERO_WALLET_PASSWORD="walletpass"` is present, confirming that the wallet password is written in plaintext to disk. In the context of a Monero wallet management skill, storing wallet credentials unencrypted in `.env` materially increases risk because compromise of the workspace or logs can expose funds-controlling secrets.

Credential Access

High
Category
Privilege Escalation
Content
# Verify .env was written
  [[ -f "$skill_copy/.env" ]]
  local env_contents
  env_contents=$(cat "$skill_copy/.env")
  [[ "$env_contents" == *"MONERO_NETWORK=\"stagenet\""* ]]
  [[ "$env_contents" == *"MONERO_WALLET_PASSWORD=\"walletpass\""* ]]
  [[ "$env_contents" == *"MONERO_WALLET_NAME=\"$wallet_dir/test_wallet\""* ]]
Confidence
84% confidence
Finding
The surrounding assertions verify that both wallet path and plaintext wallet password are embedded in `.env`, reinforcing a design where highly sensitive Monero wallet access material is persisted locally. In a cryptocurrency payment skill, this is more dangerous than a generic app credential because exposure can directly enable unauthorized wallet operations and fund theft.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
**Both paths:**
- Generate random RPC credentials (12-char user, 24-char password).
- Write `.env` (chmod 600) with all values including `MONERO_WALLET_PASSWORD`.
  - **Caution:** `.env` persists on disk and contains the wallet password. On multi-user systems or CI, ensure the file is not world-readable, not committed to version control, and not included in backups or log captures.
- Start `monero-wallet-rpc` as a background process (PID stored in `$MONERO_LOCK_DIR/wallet-rpc.pid`).
- Run `./setup.sh` and report readiness.
- **Credentials are not emitted in stdout JSON.** They exist only in `.env` (chmod 600). If the user needs to see them, read from `.env` directly.
Confidence
84% confidence
Finding
The documented default behavior persists `MONERO_WALLET_PASSWORD` in `.env` on disk and relies mainly on file permissions plus operator caution. That is an unsafe default for a wallet-managing skill because agent workspaces, CI systems, backups, or multi-user hosts may still expose the file, turning a convenience feature into a credential-compromise path with financial impact.

Static analysis

No suspicious patterns detected.