Back to skill

Security audit

Saturnzap

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed self-custodial Lightning wallet skill, but it gives agents real spending authority and includes unsafe setup, secret-output, and persistent-service patterns that require careful review.

Review this before installing. Use testnet/signet first, keep only small funds available to the agent, set strict spend caps, avoid unbounded `sz fetch` or payment commands, and do not run the one-line remote installer unless you independently verify what it executes. Treat any mnemonic or `SZ_PASSPHRASE` as full wallet access, and do not enable the systemd service until you have reviewed the unit, environment file, firewall effects, and removal path.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:59
Finding

Execution of an Unpinned Remote Installation Script

Content
View full analysis
Remediation
View remediation

T06 · System Persistence

Error
Location
SKILL.md:83
Finding

Installation of a Persistent Systemd Service from Unverified Code

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/json-contracts.md:115
Finding

Recovery Mnemonic Exposed Through Recommended Automated Setup Output

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (21)

YARA rule 'ransomware_behavior': Ransomware-like patterns (mass encryption, ransom notes) [malware]

Critical
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

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

md
---
name: saturnzap
description: "Non-custodial Lightning wallet for AI agents via `sz` CLI: send/receive sats, pay invoices, auto-pay HTTP 402 (L402), manage channels and liquidity. Use when: (1) paying for API access with Lightning, (2) creating or paying BOLT11 invoices, (3) checking wallet balance or channel health, (4) managing peers and channels. NOT for: on-chain-only Bitcoin transactions, custodial Lightning services."
homepage: https://github.com/lqwdtech/SaturnZap
metadata:
  { "openclaw": { "emoji": "⚡", "os": ["linux"], "requires": { "bins": ["sz"], "env": ["SZ_PASSPHRASE"] }, "optionalEnv": ["SZ_MCP_MAX_SPEND_SATS", "SZ_CLI_MAX_SPEND_SATS", "SZ_NETWORK", "SZ_REGION", "SZ_MAINNET_CONFIRM",

Chaining Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

Piping a network response directly into sh creates a classic command-chaining execution path with no inspection boundary, making arbitrary code execution trivial if the downloaded content is malicious or altered. In an agent context this is especially dangerous because automated systems may run the command without human scrutiny.

Content

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

bash
# Install (one-time) — one-line installer handles uv + the vendored ldk-node wheel
curl -LsSf https://raw.githubusercontent.com/lqwdtech/SaturnZap/main/install.sh | sh

# Or, if you prefer the explicit uv invocation:
# uv tool install saturnzap \

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Documenting service installation and systemd management expands the skill's capability from wallet actions into host-level persistence and service control. In an agent context, this is dangerous because it could let an AI install or manage long-running software on the host, increasing blast radius well beyond payments and enabling persistence or unauthorized system modification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description limits the skill away from 'on-chain-only Bitcoin transactions', implying a Lightning-focused wallet scope. However, the file documents direct on-chain wallet operations such as sz address and sz send, which are substantive Bitcoin on-chain transaction capabilities rather than merely Lightning channel management implementation details.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/json-contracts.md (reported line 306)May include surrounding context.

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/json-contracts.md (reported line 313)May include surrounding context.

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/json-contracts.md (reported line 325)May include surrounding context.

md
sz setup --auto

# 2. Pay for API access (L402, with spending cap)
sz fetch "https://api.example.com/data" --max-sats 100

# 3. Check if operational
sz status  # parse: synced, peer_count > 0, usable_channel_count > 0

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation actively tells users not to use this skill for on-chain-only Bitcoin transactions, then later provides wallet commands for obtaining an on-chain address and sending on-chain sats. That is a direct contradiction in operator guidance, not merely an omission or nuance.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
93% confidence
Finding

Writing the mnemonic backup to a local file creates durable secret persistence: anyone who can read that file can fully recover the wallet and spend all funds, independent of the local app. Even with mode 0600, plaintext seed storage on disk is highly sensitive and especially risky on multi-user systems, backups, synced home directories, or compromised hosts.

Content

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

md
export SZ_PASSPHRASE="your-secure-passphrase"

# Initialize wallet (first time only — generates BIP39 seed, starts node)
# RECOMMENDED for agent hosts: write the mnemonic to a mode-0600 file instead
# of stdout, so it never lands in tool-call transcripts or orchestrator logs.
sz init --backup-to ~/.saturnzap-mnemonic --no-mnemonic-stdout

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

Installing a persistent systemd service for a wallet increases the attack surface because the node remains continuously available and holds operational access to encrypted wallet state whenever the passphrase is injected for startup. On a compromised host, persistence can make it easier for an attacker to trigger payments, inspect wallet metadata, or abuse the always-on network service over a longer window.

Content

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

md
at rest. Use only if the file itself is protected (`0600`, encrypted home dir,
  etc.).

**4. Optional systemd service.** `sz service install` is **optional**. It keeps the
Lightning node running across reboots, which is necessary for payments to clear
reliably. The service runs as the invoking user, writes state under
`~/.local/share/saturnzap/<network>/`, and does not escalate privileges beyond

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The example output includes a mnemonic seed phrase, which is the wallet's root secret and grants full recovery and spending authority. In agent ecosystems, examples often get copied into logs, tests, prompts, or screenshots, so normalizing secret-bearing output materially increases risk of credential leakage and wallet compromise.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest frames the skill as a non-custodial Lightning wallet and specifically excludes on-chain-only Bitcoin transactions. However, this contract documents sz address, sz send <address>, and sz balance fields for on-chain funds, which are substantive wallet capabilities beyond a Lightning-only scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The L402 fetch flow can automatically spend funds in response to a 402 challenge, but the documentation does not prominently warn that a network request may trigger payment. In an agent setting, this creates a real risk of unintended financial loss, especially if the agent follows links or accesses untrusted endpoints within a configured max-sats threshold.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
99% confidence
Finding

Fetching and executing a remote install script in one step bypasses normal integrity review and gives the remote source immediate code execution on the host. If the upstream repository, network path, or referenced script is ever compromised, users and agents could execute arbitrary attacker-controlled shell commands.

Content

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

bash
# Install (one-time) — one-line installer handles uv + the vendored ldk-node wheel
curl -LsSf https://raw.githubusercontent.com/lqwdtech/SaturnZap/main/install.sh | sh

# Or, if you prefer the explicit uv invocation:
# uv tool install saturnzap \

Excessive Permissions

Low
Category
Privilege Escalation
Confidence
80% confidence
Finding

Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Content

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

md
**4. Optional systemd service.** `sz service install` is **optional**. It keeps the
Lightning node running across reboots, which is necessary for payments to clear
reliably. The service runs as the invoking user, writes state under
`~/.local/share/saturnzap/<network>/`, and does not escalate privileges beyond
opening port 9735 via UFW if UFW is active.

**What this skill does NOT do:**