Back to skill

Security audit

Agent Sovereign Stack

Security checks for vulnerabilities and agentic risk

Overview

This skill performs its advertised sovereign-agent setup, but it also uploads sensitive memory and identity files over plaintext HTTP and uses wallet private keys for blockchain actions without strong safeguards.

Install only if you are comfortable with your agent identity, memory files, and messages being sent to the configured FilStream service without transport encryption or client-side encryption. Use a dedicated low-balance wallet, avoid passing private keys on the command line, inspect every file before upload, and treat any on-chain registration or treasury deployment as persistent and potentially irreversible.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/onboard.py:208
Finding

Unsafe Remote Installer Executed Through a curl-to-Shell Pipeline

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/onboard.py:44
Finding

Unencrypted Upload of Sensitive Agent Identity and Memory Files over Plaintext HTTP

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/comms.py:40
Finding

Unauthenticated Mailbox Writes and Forgeable Agent Messages

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/onboard.py:49
Finding

Ethereum Private Key Exposed Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (26)

Tainted flow: 'req' from os.environ.get (line 54, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The network destination is derived from the MEMORY_STORE_URL environment variable and used directly in urllib.request.urlopen without validation. In an agent setting, this enables SSRF-style redirection or silent forwarding of all message contents to an attacker-controlled endpoint, especially because the script automatically transmits message bodies and metadata.

Content

Scanner excerpt · scripts/comms.py (reported line 58)May include surrounding context.

python
if data:
        req.add_header("Content-Type", "application/json")
    try:
        with urllib.request.urlopen(req, timeout=15) as resp:
            return json.loads(resp.read())
    except urllib.error.HTTPError as e:
        return {"error": f"HTTP {e.code}", "body": e.read().decode()[:200]}

Tainted flow: 'req' from os.environ.get (line 83, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The upload destination is derived from the FILSTREAM_INDEX environment variable and used directly in urllib.request.urlopen without validation or any requirement for HTTPS. An attacker who can influence the environment can redirect sensitive memory and identity uploads to an arbitrary server, enabling exfiltration of potentially highly sensitive agent data.

Content

Scanner excerpt · scripts/memory_client.py (reported line 89)May include surrounding context.

python
headers={"Content-Type": "application/json"},
                    method="POST",
                )
                with urllib.request.urlopen(req, timeout=30) as resp:
                    result = json.loads(resp.read())
                    cid = result.get("cid") or result.get("Hash") or result.get("IpfsHash")
                    if cid:

Tainted flow: 'req' from os.environ.get (line 73, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The script uploads identity content and later posts communications to a hard-coded remote endpoint over plain HTTP, exposing sensitive agent data to interception or tampering in transit. In this skill's context, the uploaded files may include identity, memory, and user data, so sending them to an unauthenticated remote store materially increases privacy and integrity risk.

Content

Scanner excerpt · scripts/onboard.py (reported line 79)May include surrounding context.

python
headers={"Content-Type": "application/json"},
            method="PUT",
        )
        with urllib.request.urlopen(req, timeout=15) as resp:
            return json.loads(resp.read())
    except Exception as e:
        return {"error": str(e)}

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · scripts/comms.py (reported line 6)May include surrounding context.

python
📡 Agent Communication Protocol — Phase 3

Decentralized agent-to-agent messaging using the FilStream Memory Store as
a shared message bus. Agents post messages to their mailbox; other agents
poll for new messages. Simple, pull-based, no central coordinator.

Architecture:

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · scripts/comms.py (reported line 17)May include surrounding context.

python
- On-chain message anchoring optional (for high-value messages)

Endpoints used:
  PUT  /api/v1/agent/:id/memory          — post message to own outbox
  GET  /api/v1/agent/:id/memory/history   — read agent's messages

Usage:

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstring states the library manages encrypted agent memories, but the implementation only base64-encodes content before transmitting it. This can cause operators or downstream code to wrongly assume confidentiality exists, leading to upload of secrets, identity snapshots, and memory files in plaintext-equivalent form.

Content

No source excerpt is available for this finding.

Context Leakage

High
Category
Data Exfiltration
Confidence
97% confidence
Finding

The function serializes and uploads raw memory content, including identity snapshots and workspace memory files, to a remote service. In this skill context, those files are likely to contain sensitive agent context, secrets, operational notes, or personally identifying data, so transmitting them off-host creates a clear context-leakage risk.

Content

Scanner excerpt · scripts/memory_client.py (reported line 68)May include surrounding context.

python
def upload_to_filstream(data_bytes, filename, metadata=None):
    """Upload memory to FilStream index server."""
    try:
        # Try the agent memory API endpoint first
        payload = json.dumps({

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
84% confidence
Finding

Copying the full parent environment into child processes can leak unrelated secrets to external tooling that does not need them. In an agent execution environment, inherited variables often contain API keys, tokens, and operational secrets, so broad environment forwarding expands the blast radius if the subprocess or its dependencies are compromised.

Content

Scanner excerpt · scripts/onboard.py (reported line 54)May include surrounding context.

python
def run_cast(args, private_key=None):
    """Run a cast command and return output."""
    cmd = ["cast"] + args
    env = os.environ.copy()
    if private_key:
        env["ETH_PRIVATE_KEY"] = private_key
    result = subprocess.run(cmd, capture_output=True, text=True, env=env, timeout=30)

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 · scripts/onboard.py (reported line 213)May include surrounding context.

python
forge_check = subprocess.run(["forge", "--version"], capture_output=True, text=True)
    if forge_check.returncode != 0:
        print("  ⚠️  Foundry (forge) not installed. Cannot deploy treasury.")
        print("  💡 Install: curl -L https://foundry.paradigm.xyz | bash && foundryup")
        return None

    # Find the contract source

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script silently loads a private key from a local secrets file and immediately uses it to derive an address, register on-chain, and potentially deploy contracts without an explicit confirmation gate. In this skill context, that can trigger irreversible blockchain transactions and expose funds to loss if the script or referenced contract behavior is unsafe or unexpected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises uploading agent identity, memory, and identity snapshots to decentralized storage and registering them on-chain without any prominent warning that these actions may be public, persistent, and effectively irreversible. Because SOUL.md and MEMORY.md may contain sensitive operational context, credentials, or personal data, users could unintentionally disclose high-value information permanently.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs users to provide an ETH private key and optionally deploy a treasury wallet, but it does not prominently warn that misuse of the key, malicious script behavior, incorrect contract interactions, or misconfigured treasury policies can directly expose funds and compromise agent operations. In this context, the combination of private-key handling, blockchain transactions, and treasury deployment materially raises the risk of financial loss and integrity failure if users proceed without understanding the consequences.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The default MEMORY_STORE uses plain HTTP, so messages, agent identifiers, and metadata are sent without transport encryption. In this context, the tool is explicitly used for inter-agent communication, making interception, tampering, and replay by any network observer materially dangerous.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code claims to create a signed message envelope, but it only computes an unsigned content hash over attacker-controlled fields. A hash alone provides no authenticity, so any party able to write to the store can forge messages as another agent, undermining trust in sender identity and message integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The header acknowledges encryption is not yet implemented, but the script still uploads memory content without a strong warning that confidentiality is absent. Because the skill handles 'memory' and identity data, the lack of explicit unencrypted-upload warning makes accidental exposure more likely and more dangerous than in ordinary file-transfer tooling.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The usage block documents a 'retrieve ' command for downloading stored memories, which implies the client supports content retrieval. However, the CLI dispatch only implements history, latest, upload, and upload-all, with no retrieve branch or retrieval function anywhere in the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The bulk upload path automatically collects identity and memory files and sends them over the network without a clear warning that they may contain sensitive information. In an agent-memory context, these files can include credentials, personal data, prompts, or internal state, so silent transmission materially increases disclosure risk.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

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

python
env = os.environ.copy()
    if private_key:
        env["ETH_PRIVATE_KEY"] = private_key
    result = subprocess.run(cmd, capture_output=True, text=True, env=env, timeout=30)
    if result.returncode != 0:
        return {"error": result.stderr.strip()}
    return {"output": result.stdout.strip()}

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The step_2 docstring and user-facing text say the script is 'Uploading to FilStream (IPFS)', implying IPFS publication behavior. In practice, the code sends the file contents via HTTP PUT to a hard-coded memory store URL, so the documentation describes a materially different operation than the implemented transport and destination.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script automatically uploads local identity-related files to a remote service without an explicit privacy warning, review step, or file allowlist confirmation. In an agent workspace, files like SOUL.md, MEMORY.md, IDENTITY.md, and USER.md can contain sensitive prompts, internal state, or user information, so silent exfiltration to a third-party service is materially risky.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/onboard.py (reported line 210)May include surrounding context.

python
print(f"  Policy:   5 USDC/day, 2 USDC/tx, 5min cooldown, 50 USDC/month")

    # We need the compiled contract. Check if forge is available
    forge_check = subprocess.run(["forge", "--version"], capture_output=True, text=True)
    if forge_check.returncode != 0:
        print("  ⚠️  Foundry (forge) not installed. Cannot deploy treasury.")
        print("  💡 Install: curl -L https://foundry.paradigm.xyz | bash && foundryup")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
79% confidence
Finding

The script invokes forge to compile and deploy a contract from the local repository while supplying a live private key, which means running this skill causes code from the repo to be trusted for an on-chain transaction. In an agent-skill context, this is dangerous because the referenced Solidity contract can be modified independently of this script, leading to unauthorized or unsafe contract deployment and immediate fund risk.

Content

Scanner excerpt · scripts/onboard.py (reported line 226)May include surrounding context.

python
return None

    print("  🔨 Compiling and deploying...")
    result = subprocess.run([
        "forge", "create", str(contract_src) + ":AgentTreasury",
        "--rpc-url", rpc,
        "--private-key", private_key,

Tainted flow: 'private_key' from os.environ.get (line 340, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/onboard.py (reported line 226)May include surrounding context.

python
return None

    print("  🔨 Compiling and deploying...")
    result = subprocess.run([
        "forge", "create", str(contract_src) + ":AgentTreasury",
        "--rpc-url", rpc,
        "--private-key", private_key,

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

save_contacts and save_inbox persist communication metadata and message content under ~/.openclaw/workspace/agent-vault/comms, but the user-facing usage/help text does not mention this local storage behavior. For a communications tool, silently persisting inbox contents can affect privacy expectations and should be disclosed.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The top-level documentation lists 'Set up comms mailbox' as an onboarding step, which suggests provisioning or configuring a mailbox. The corresponding implementation only uploads one announcement message to the memory store and prints a history URL, so the documented intent overstates what the code actually does.

Content

No source excerpt is available for this finding.