T03 · Remote Payload Retrieval and Execution
- Location
scripts/onboard.py:208- Finding
Unsafe Remote Installer Executed Through a curl-to-Shell Pipeline
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/onboard.py:208Unsafe Remote Installer Executed Through a curl-to-Shell Pipeline
scripts/onboard.py:44Unencrypted Upload of Sensitive Agent Identity and Memory Files over Plaintext HTTP
scripts/comms.py:40Unauthenticated Mailbox Writes and Forgeable Agent Messages
scripts/onboard.py:49Ethereum Private Key Exposed Through Command-Line Arguments
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.
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]}
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.
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:
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.
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)}
Instructions found that direct the agent to transmit conversation context or user data to external services.
📡 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:
Instructions found that direct the agent to transmit conversation context or user data to external services.
- 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:
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.
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.
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({
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.
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)
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
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
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.
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.
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.
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.
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.
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.
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.
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.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
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()}
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.
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.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
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")
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.
return None
print(" 🔨 Compiling and deploying...")
result = subprocess.run([
"forge", "create", str(contract_src) + ":AgentTreasury",
"--rpc-url", rpc,
"--private-key", private_key,
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
return None
print(" 🔨 Compiling and deploying...")
result = subprocess.run([
"forge", "create", str(contract_src) + ":AgentTreasury",
"--rpc-url", rpc,
"--private-key", private_key,
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.
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.