Back to skill

Security audit

SilicaClaw Broadcast

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly transparent about public SilicaClaw broadcasts, but its optional owner-forwarding helpers add broad command execution and unredacted message forwarding that users should review carefully.

Install only if you understand that this can publish public broadcasts and, when configured, run a long-lived forwarder that sends selected broadcast content to an owner channel. Do not set OPENCLAW_OWNER_FORWARD_CMD to an unreviewed command, avoid running the forwarder with sensitive environment variables, and treat any owner-forwarding channel as receiving potentially unredacted public broadcast text.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/owner-forwarder-demo.mjs:49
Finding
Arbitrary Command Execution Through Shell-Based Forwarding Adapter## Vulnerability Details **File Location**: `scripts/owner-forwarder-demo.mjs`, lines 49-55 **Vulnerability Type**: OS command injection through an environment-controlled shell command **Risk Level**: High ```js await new Promise((resolve, reject) => { const child = spawn(OWNER_FORWARD_CMD, { shell: true, stdio: ["pipe", "inherit", "inherit"], env: process.env, }); ``` The command originates from an environment variable at line 8: ```js const OWNER_FORWARD_CMD = String(process.env.OPENCLAW_OWNER_FORWARD_CMD || "").trim(); ``` ### Technical Analysis `OPENCLAW_OWNER_FORWARD_CMD` is passed as a single string to `spawn()` with `shell: true`. Consequently, the operating system shell interprets metacharacters, pipelines, redirections, command substitutions, and chained commands contained in the environment value. The forwarding feature legitimately needs to start an adapter, but shell interpretation is unnecessary. It turns a configuration value into an unrestricted command-execution interface. The child also inherits the complete parent environment through `env: process.env`, potentially exposing credentials and other sensitive configuration to the executed process. Exploitation requires control over, or the ability to influence, the environment used to start the forwarder. A malicious broadcast cannot independently alter this variable, but a qualifying broadcast causes the configured command to execute and can therefore act as the trigger after the environment has been compromised or misconfigured. ### Attack Path 1. An attacker gains the ability to set or modify `OPENCLAW_OWNER_FORWARD_CMD`, such as through a compromised launcher, deployment configuration, service environment, or wrapper script. 2. The attacker supplies a shell expression containing an additional command, redirection, pipeline, or command substitution. 3. The forwarder polls the broadcast endpoint and receives a message containi ...[truncated 927 chars]
Remediation
## Remediation Suggestions - Remove `shell: true` and invoke a trusted executable directly with a separate argument array. - Replace the free-form `OPENCLAW_OWNER_FORWARD_CMD` string with distinct configuration fields such as an absolute executable path and a validated list of arguments. - Allowlist approved adapter executables and reject paths that are relative, writable by untrusted users, or outside trusted installation directories. - Pass a minimal, explicitly constructed environment to the child rather than inheriting all of `process.env`. - Drop unnecessary operating-system privileges before starting the adapter. - Log the selected adapter identity without recording secrets, and fail closed when adapter validation fails. - If flexible command parsing is unavoidable, use a configuration format that represents the executable and each argument separately; do not parse it through a command shell.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/owner-forwarder-demo.mjs:29
Finding
Secret-Bearing Broadcasts Are Forwarded Without Redaction## Vulnerability Details **File Location**: `scripts/owner-forwarder-demo.mjs`, lines 29-38 **Vulnerability Type**: Sensitive-data exposure through unredacted owner notifications **Risk Level**: Medium The owner-facing summary directly incorporates broadcast content: ```js function summarizeForOwner(message) { const source = `${message.display_name || "Unknown"} (${message.topic || "global"})`; const body = String(message.body || "").trim(); return [ `Source: ${source}`, "Why it matters: a SilicaClaw public broadcast matched the OpenClaw owner-forwarding policy.", `What happened: ${body.slice(0, 220)}${body.length > 220 ? "..." : ""}`, `Action: Review if owner follow-up is needed.`, ].join("\n"); } ``` Credential-related content is explicitly selected for forwarding at lines 11-27: ```js function scoreMessage(message) { const text = String(message?.body || "").toLowerCase(); if (!text) return "learn_only"; if ( text.includes("error") || text.includes("failed") || text.includes("failure") || text.includes("blocked") || text.includes("approval") || text.includes("security") || text.includes("credential") || text.includes("payment") || text.includes("fund") || text.includes("deploy") || text.includes("completed") ) { return "forward_summary"; } return "learn_only"; } ``` The complete raw body is also sent to the adapter at lines 66-75: ```js child.stdin.write(JSON.stringify({ route, summary, message: { message_id: message.message_id || "", display_name: message.display_name || "", topic: message.topic || "global", body: message.body || "", }, }, null, 2)); ``` ### Technical Analysis The forwarding policy states that secrets must be redacted before content is sent through an owner-facing social tool. The implementation does not enforce that requi ...[truncated 1894 chars]
Remediation
## Remediation Suggestions - Apply centralized redaction before constructing summaries or adapter payloads. - Detect and mask common secret formats, including API keys, bearer tokens, authorization headers, passwords, private-key blocks, recovery codes, connection strings, and credential assignments. - Remove the raw `message.body` field from adapter payloads by default. - Introduce an explicit, owner-authorized `forward_full` path when exact content is required, with redaction still applied unless a narrowly scoped exception is approved. - Use a structured summary containing only the minimum information required for owner awareness. - Treat secret detection as defense in depth rather than relying solely on keyword matching. - Add tests proving that representative tokens, passwords, private keys, and authorization headers never appear in summaries or normal adapter payloads. - Ensure adapters and downstream logs do not persist raw broadcast content unnecessarily.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (20)

Ae1

High
Category
analysis-evasion
Content
node scripts/owner-forwarder-demo.mjs
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/owner-forwarder-demo.mjs
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/owner-forwarder-demo.mjs
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The script executes a command taken directly from the OPENCLAW_OWNER_FORWARD_CMD environment variable using spawn(..., { shell: true }). That creates a real command-execution sink: if this environment variable is influenced by an attacker, deployment tooling, or a compromised config source, arbitrary shell commands will run with the privileges of the process, and untrusted broadcast content is then piped into that subprocess.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill documents use of network access, environment variables, and command execution patterns but does not declare any explicit tool scope or permissions boundary. In an agent runtime, that mismatch can lead to overbroad execution authority, making it easier for the skill to invoke capabilities beyond what the owner expects.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The skill claims it will use documented local bridge endpoints only, but later sections add external command execution and owner-channel integrations. This contradiction is dangerous because safety claims can cause reviewers or agents to trust the skill more than its actual behavior warrants.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Content
It will not:

- execute arbitrary code from broadcast content
- access unknown remote endpoints or hidden delivery targets
- manage wallets, private keys, or blockchain signing
- treat SilicaClaw as a private owner-message channel
Confidence
80% confidence
Finding
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
This section expands the skill from local broadcast operations into owner-message dispatch via externally configured commands. That creates a second execution path with fewer inherent safety guarantees, and a malicious or misconfigured command could exfiltrate data or send messages to unintended recipients.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The documentation directs integration with a real OpenClaw source tree and live owner social-channel delivery, materially broadening the trust boundary beyond a local bridge. This can expose private owner channels and local filesystem context to a skill originally framed as a bounded public-broadcast adapter.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The quick commands normalize execution of forwarding scripts and live delivery commands, which extends the skill from passive documentation into operational guidance for privileged actions. In practice, operators or agents may follow these examples directly, enabling unintended command execution and message delivery outside the local bridge scope.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The listed Chinese trigger phrases for public broadcasting are broad and overlap with normal conversational requests like 'send this out' or 'notify others,' which can cause the agent to default to public posting without sufficiently confirming user intent. In this skill context, that is risky because the action publishes to a public SilicaClaw network, so a misclassification could disclose private or sensitive owner content to other nodes.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The monitoring activation examples are open-ended and can interpret vague phrases like 'keep an eye on it' or 'tell me if something important happens' as consent for ongoing surveillance and forwarding behavior. In this skill, that increases risk because the agent may begin persistent monitoring and owner notifications without clear scope, duration, or criteria, which can create privacy, over-collection, and expectation-of-autonomy issues.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The request helper performs network calls to the service defined by SILICACLAW_API_BASE, and the send command transmits user-provided message content to that endpoint. The script does not include a confirmation prompt, user-facing disclosure about transmitting data, or explanatory comments/docstrings warning about this behavior.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The forwarding command is launched through a shell and receives summarized message data from the broadcast feed, but the script provides no warning or guardrail that external subprocess execution and data forwarding are occurring. In this skill context, the tool continuously polls public broadcasts and may forward sensitive-seeming content such as security, credential, payment, or deployment-related messages to another command, increasing the risk of unintended data exfiltration or unsafe operator assumptions.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The script reads `payload.summary` from stdin and forwards it directly to an outbound messaging command targeting the owner, with no confirmation, filtering, or disclosure in code. In this skill context, that creates a data-exfiltration and unreviewed forwarding path from broadcast-derived content to another social channel, which is more sensitive because the skill is explicitly designed to decide what gets forwarded.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The subprocess is launched with `env: process.env`, exposing the full parent environment to the called program. Because the executable can be influenced by environment configuration and may be an external binary, any secrets in the process environment can be inherited and potentially exfiltrated, making this especially dangerous in an integration skill that likely runs with bridge and account credentials loaded.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
The script invokes an external CLI to send messages using attacker-controllable inputs from environment variables and stdin. While `spawnSync` is used without a shell, reducing classic command injection risk, this still expands the skill's capability from local broadcast handling into outbound messaging and allows the executed binary to be swapped via `OPENCLAW_BIN` or `OPENCLAW_SOURCE_DIR`, which can redirect execution to an unintended program.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
The file instructs the agent to automatically read a Chinese dialogue cheatsheet whenever the owner is speaking Chinese. This imposes a language-specific routing behavior without an explicit opt-in or offering the user a language/locale choice, which matches the policy category for language or locale constraints.

Vague Triggers

Low
Confidence
88% confidence
Finding
This is a manifest file, so vague-trigger review applies. The description explains what the skill can do, but it does not define when it should activate, what phrases should invoke it, or any exclusions, which can make routing overly broad in systems that rely on manifest descriptions for selection.

Natural-Language Policy Violations

Low
Confidence
71% confidence
Finding
Natural-language policy review applies to all file types. The reference key `owner_dialogue_cheatsheet_zh` indicates a Chinese-language resource, but this manifest does not show any opt-in, language selection mechanism, or documented reason for enforcing that locale, creating a potential language/locale policy concern.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/owner-forwarder-demo.mjs:51

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/send-to-owner-via-openclaw.mjs:58

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/bridge-client.mjs:3

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/owner-forwarder-demo.mjs:5