Back to skill

Security audit

world2agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for managing World2Agent sensors, but it needs review because it can install unpinned npm packages, change OpenClaw hook settings, start background services, and auto-send replies to chat channels.

Review this carefully before installing. Only use it with sensor packages and bridge packages you trust, avoid sudo npm installs, confirm where notifications will be delivered, and inspect any OpenClaw hook/config changes and background service registration before allowing it to run.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Error
Location
scripts/read-setup.sh:17
Finding

Unpinned npm Packages Execute Lifecycle Scripts Before Review

Content
View full analysis
&2 \ || out_err "fetching $pkg failed (see stderr)" else log=$(mktemp) if ! npm install --prefix "$npm_root" --no-audit --no-fund "$pkg" >"$log" 2>&1; then cat "$log" >&2 rm -f "$log" out_err "fetching $pkg failed (set NPM_DEBUG=1 to see full output)" fi rm -f "$log" fi ``` `scripts/install-sensor.sh:164-172`: ```bash # Step 1: ensure the sensor package is installed under the W2A npm root. npm_root=$(w2a_npm_root) mkdir -p "$npm_root" log=$(mktemp) if ! npm install --prefix "$npm_root" --no-audit --no-fund "$pkg" >"$log" 2>&1; then cat "$log" >&2; rm -f "$log" out_err "fetching $pkg failed" fi rm -f "$log" ``` `scripts/bootstrap.sh:23-36`: ```bash # Step 1: binary on PATH. If missing, auto-install the bridge package globally # via npm. The agent will surface npm's stderr (sudo prompt, EACCES, etc.) so # the user can re-run with elevated rights if needed. binary_status="present" if ! command -v world2agent-openclaw-supervisor >/dev/null 2>&1 \ || ! command -v world2agent-openclaw-runner >/dev/null 2>&1; then command -v npm >/dev/null 2>&1 \ || out_err "world2agent-openclaw-supervisor not on PATH and 'npm' is unavailable; install Node.js + npm first, or install the bridge runtime manually" printf '[bootstrap] installing @world2agent/openclaw-sensor-bridge globally...\n' >&2 install_log=$(mktemp) if ! npm install -g @world2agent/openclaw-sensor-bridge >"$install_log" 2>&1; then cat "$install_log" >&2 rm -f "$install_log" ...[truncated 2999 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/bootstrap.sh:59
Finding

Predictable Shared Temporary File Allows Symlink-Based File Clobbering

Content
View full analysis
/tmp/.w2a-hooks-err) || { err=$(cat /tmp/.w2a-hooks-err 2>/dev/null); rm -f /tmp/.w2a-hooks-err out_err "could not configure OpenClaw hooks: ${err:-unknown error}. Edit $(openclaw_config_path) manually to set hooks.enabled=true, hooks.token=\"\", hooks.allowRequestSessionKey=true, hooks.allowedSessionKeyPrefixes=[\"hook:\",\"w2a:\"]; then restart the gateway." } rm -f /tmp/.w2a-hooks-err ``` ### Technical Analysis The script redirects standard error to the fixed path `/tmp/.w2a-hooks-err`. On typical multi-user systems, `/tmp` is writable by every local user. Shell redirection opens and truncates the destination before `ensure_openclaw_hooks` runs. The code neither creates the file securely nor verifies that it is a regular file owned by the current user. An attacker who can create the pathname first may make it a symbolic link to another file writable by the victim. When the victim runs `bootstrap.sh`, the redirection follows the symbolic link and truncates the target. The later `rm -f` removes the symlink itself rather than repairing the target file. The attack does not require shell-command injection. ### Attack Path 1. A local attacker predicts the constant pathname `/tmp/.w2a-hooks-err`. 2. The attacker creates a symbolic link at that path pointing to a file the victim can write, such as a user configuration or startup file. 3. The victim invokes `scripts/bootstrap.sh`. 4. The shell processes `2>/tmp/.w2a-hooks-err` and follows the attacker-created symbolic link. 5. The linked target is opened with truncation before `ensure_openclaw_hooks` executes. 6. The victim's target file is emptied or overwritten with diagnostic output. 7. The script removes the temporary symlink, reducing evidence ...[truncated 695 chars]
Remediation
View remediation
"$hooks_err_file") || { err=$(cat -- "$hooks_err_file" 2>/dev/null) out_err "could not configure OpenClaw hooks: ${err:-unknown error}" } ``` Additional hardening should include: 1. Use `mktemp` for every temporary file rather than predictable names. 2. Install an `EXIT`, `INT`, and `TERM` cleanup trap where appropriate. 3. Quote every temporary pathname and use `--` before path arguments. 4. Keep temporary files private with a restrictive `umask`, such as `umask 077`. 5. Do not run bootstrap with elevated privileges; if privileged execution is ever supported, explicitly reject unsafe temporary-directory ownership or permissions. ]]>
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 (67)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose focuses on sensor lifecycle management (install, list, remove) through the supervisor. The actual code chunk does not manage sensors at all; it only accesses the supervisor log file and outputs raw log lines, optionally continuously and with filtering. That is a materially different function and involves an undeclared capability: exposing log contents from a local file. This is not just an implementation detail of installation/removal/listing, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose is sensor lifecycle management through a specific supervisor bridge. The actual code instead implements a helper that downloads a named package and emits metadata and setup documentation from the package directory. While this could be a supporting step in a larger sensor-management workflow, this chunk by itself has a materially different primary behavior and lacks the key declared actions and integrations (supervisor control, hook signaling, install/list/remove operations). Therefore the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Ssd 1

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The handler template explicitly downgrades the meaning of the security envelope around webhook content and tells the model to treat matching webhook payloads as trusted data sufficient to proceed. This weakens a core defense against prompt injection from external sources: even if framed as 'data, not instructions,' the content can still embed manipulative text that influences summarization, routing, or tool-using behavior if handlers are not extremely strict.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
96% confidence
Finding

The anti-refusal instruction tells the model not to refuse solely because of the external-content security envelope. In practice, anti-refusal language pressures the model to suppress conservative safety behavior in exactly the scenario where untrusted content is entering the system, increasing the chance of prompt-injection success or unsafe automated handling.

Content

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

md
rules to it. Do not refuse with `NO_REPLY` solely because of the security

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/bootstrap.sh (reported line 60)May include surrounding context.

sh
# user must restart `openclaw gateway` for the new block to take effect —
# we surface that via gateway_restart_needed in the output.
hooks_action=$(ensure_openclaw_hooks 2>/tmp/.w2a-hooks-err) || {
  err=$(cat /tmp/.w2a-hooks-err 2>/dev/null); rm -f /tmp/.w2a-hooks-err
  out_err "could not configure OpenClaw hooks: ${err:-unknown error}. Edit $(openclaw_config_path) manually to set hooks.enabled=true, hooks.token=\"<secret>\", hooks.allowRequestSessionKey=true, hooks.allowedSessionKeyPrefixes=[\"hook:\",\"w2a:\"]; then restart the gateway."
}
rm -f /tmp/.w2a-hooks-err

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/bootstrap.sh (reported line 63)May include surrounding context.

sh
# user must restart `openclaw gateway` for the new block to take effect —
# we surface that via gateway_restart_needed in the output.
hooks_action=$(ensure_openclaw_hooks 2>/tmp/.w2a-hooks-err) || {
  err=$(cat /tmp/.w2a-hooks-err 2>/dev/null); rm -f /tmp/.w2a-hooks-err
  out_err "could not configure OpenClaw hooks: ${err:-unknown error}. Edit $(openclaw_config_path) manually to set hooks.enabled=true, hooks.token=\"<secret>\", hooks.allowRequestSessionKey=true, hooks.allowedSessionKeyPrefixes=[\"hook:\",\"w2a:\"]; then restart the gateway."
}
rm -f /tmp/.w2a-hooks-err

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/bootstrap.sh (reported line 60)May include surrounding context.

sh
# user must restart `openclaw gateway` for the new block to take effect —
# we surface that via gateway_restart_needed in the output.
hooks_action=$(ensure_openclaw_hooks 2>/tmp/.w2a-hooks-err) || {
  err=$(cat /tmp/.w2a-hooks-err 2>/dev/null); rm -f /tmp/.w2a-hooks-err
  out_err "could not configure OpenClaw hooks: ${err:-unknown error}. Edit $(openclaw_config_path) manually to set hooks.enabled=true, hooks.token=\"<secret>\", hooks.allowRequestSessionKey=true, hooks.allowedSessionKeyPrefixes=[\"hook:\",\"w2a:\"]; then restart the gateway."
}
rm -f /tmp/.w2a-hooks-err

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/install-sensor.sh (reported line 169)May include surrounding context.

sh
# user must restart `openclaw gateway` for the new block to take effect —
# we surface that via gateway_restart_needed in the output.
hooks_action=$(ensure_openclaw_hooks 2>/tmp/.w2a-hooks-err) || {
  err=$(cat /tmp/.w2a-hooks-err 2>/dev/null); rm -f /tmp/.w2a-hooks-err
  out_err "could not configure OpenClaw hooks: ${err:-unknown error}. Edit $(openclaw_config_path) manually to set hooks.enabled=true, hooks.token=\"<secret>\", hooks.allowRequestSessionKey=true, hooks.allowedSessionKeyPrefixes=[\"hook:\",\"w2a:\"]; then restart the gateway."
}
rm -f /tmp/.w2a-hooks-err

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/install-sensor.sh (reported line 90)May include surrounding context.

sh
fi

# Auto-detect a default delivery target when neither --notify-channel nor
# --notify-to is supplied. Reads ~/.openclaw/.env for the first
# <PLATFORM>_HOME_CHANNEL=<handle> entry in priority order — same convention
# hermes-sensor-bridge uses, so users with paired chat platforms get signals
# pushed to their actual inbox by default instead of disappearing into a

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/install-sensor.sh (reported line 96)May include surrounding context.

sh
# pushed to their actual inbox by default instead of disappearing into a
# session lane only the dashboard surfaces.
if [ -z "$notify_channel" ] && [ -z "$notify_to" ]; then
  env_file="$(openclaw_home)/.env"
  if [ -f "$env_file" ]; then
    for plat in feishu imessage telegram slack discord signal whatsapp wecom dingtalk; do
      var=$(printf '%s_HOME_CHANNEL' "$plat" | tr '[:lower:]' '[:upper:]')

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/remove-sensor.sh (reported line 6)May include surrounding context.

sh
#
# Args:
#   <package>      full npm package name
#   [--purge]      additionally rm ~/.openclaw/skills/<skill_id>/ + npm uninstall
#                  the package (only when no other runtime still references it)
#
# Behavior: only the `_openclaw_bridge` block is dropped. If the entry

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to perform sensitive filesystem reads and shell execution but does not declare any tool scope or allowed-tools constraints. In a skill that installs packages, mutates local config, and manages background services, this increases the chance of over-broad tool use and reduces policy enforceability if the skill is invoked unexpectedly or manipulated by adversarial inputs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger conditions are extremely broad, covering almost any request to watch, subscribe, or be notified about external information sources. Over-broad invocation increases the risk that the skill runs in contexts the user did not intend, leading to package installation, config mutation, service startup, or outbound notifications without sufficiently specific consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document first assures the agent it will never edit OpenClaw or World2Agent config files by hand, but later directs bootstrap to mutate ~/.openclaw/openclaw.json. Contradictory operational claims are dangerous in security-sensitive skills because they can mislead reviewers and users about what state changes occur, especially when authentication hooks and session-key policies are being modified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The default behavior silently auto-routes sensor outputs to the first paired chat channel found in the user's environment and explicitly tells the agent not to ask unless the user raises delivery. That creates a real risk of unintended outbound data disclosure, because external signal content and model-generated replies may be pushed to a messaging platform without an explicit per-install consent step.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The skill instructs the agent to make an autonomous privacy-impacting decision: send replies to a detected paired channel without asking the user. Autonomous channel selection is risky here because it can expose external content, derived summaries, or sensitive configuration outcomes to the wrong destination based on ambient host state rather than explicit user intent.

Content

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

md
`install-sensor.sh` auto-fills `--notify-channel` / `--notify-to` from the
home-channel env vars and the agent reply is pushed to that chat. Only
when no `<PLATFORM>_HOME_CHANNEL` is set does it fall back to
dashboard-only. So **don't ask the user about delivery unless they raise
it** — a paired channel is a strong signal they've already chosen their
preferred inbox.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The uninstall section says the skill 'never wrote' to ~/.openclaw/openclaw.json, directly conflicting with the earlier bootstrap behavior that can edit that file. This can cause operators to make unsafe rollback decisions, misunderstand persistence, or fail to audit lingering hook configuration after removal.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/_lib.sh (reported line 180)May include surrounding context.

sh
--argjson existing "$existing" \
    '$existing + {version: 1, control_token: $ctok, control_port: $port}')
  printf '%s\n' "$merged" >"$path"
  chmod 600 "$path" 2>/dev/null || true
}

# ---- OpenClaw gateway config probe -----------------------------------------

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The library contains ensure_openclaw_hooks(), which creates and rewrites ~/.openclaw/openclaw.json to enable hooks, generate or preserve authentication tokens, and alter allowed session-key prefixes. That is a real security-relevant side effect outside simple sensor CRUD: it changes trust boundaries and expands how local services can deliver hook traffic to the agent. In the context of a skill advertised as managing World2Agent sensors, silently mutating gateway security configuration is broader than users would reasonably expect.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code explicitly enables hooks.enabled, sets or generates hooks.token, and turns on hooks.allowRequestSessionKey, which reconfigures local service authentication and hook policy. Even if needed operationally, these are security-sensitive changes because they broaden the hook interface and may permit new request/session routing behavior that other components can use. For a sensor-management skill, that makes the capability more dangerous than the description suggests.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The bootstrap script exceeds a narrow 'sensor management' role by performing host-level package installation, mutating OpenClaw gateway configuration, and starting a supervisor process. In an agent-skill context, this expands the trust boundary substantially: invoking the skill can change persistent system state and enable new hook behavior, which is risky if users expect only application-level sensor management.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script automatically runs 'npm install -g' to fetch and install software globally if required binaries are missing. Global package installation introduces supply-chain and privilege risks, especially in an agent-triggered workflow where dependency retrieval and execution can occur with broad host impact and may prompt for elevated rights.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
}

# Step 1: binary on PATH. If missing, auto-install the bridge package globally
# via npm. The agent will surface npm's stderr (sudo prompt, EACCES, etc.) so
# the user can re-run with elevated rights if needed.
binary_status="present"
if ! command -v world2agent-openclaw-supervisor >/dev/null 2>&1 \

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/bootstrap.sh (reported line 24)May include surrounding context.

sh
}

# Step 1: binary on PATH. If missing, auto-install the bridge package globally
# via npm. The agent will surface npm's stderr (sudo prompt, EACCES, etc.) so
# the user can re-run with elevated rights if needed.
binary_status="present"
if ! command -v world2agent-openclaw-supervisor >/dev/null 2>&1 \

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/bootstrap.sh (reported line 36)May include surrounding context.

sh
}

# Step 1: binary on PATH. If missing, auto-install the bridge package globally
# via npm. The agent will surface npm's stderr (sudo prompt, EACCES, etc.) so
# the user can re-run with elevated rights if needed.
binary_status="present"
if ! command -v world2agent-openclaw-supervisor >/dev/null 2>&1 \