Back to skill

Security audit

Live Sessions Dashboard

Security checks for vulnerabilities and agentic risk

Overview

This dashboard appears intended for OpenClaw session monitoring, but it reads sensitive log/session data by default and can save or share raw session identifiers in HTML.

Install only if the operator is comfortable giving the skill access to OpenClaw session metadata. Prefer running the CLI monitor with --no-subscribe, do not rely on AGENT_MONITOR_NO_SUBSCRIBE unless the code is fixed, and avoid remote hosting of generated HTML unless identifiers are removed and access is protected. Treat generated dashboard files as sensitive operational data and clear or redact them before sharing.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (4)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/agents_canvas_snapshot.py:112
Finding

Sensitive session metadata is persisted in a shareable HTML artifact

Content
View full analysis
{status}" cost_cell = f"{html.escape(cost_display)}" if args.cost_per_1k > 0 else "" rows_html.append( "" f"{key}" f"{status_badge}" f"{runtime_display}" f"{last_update_ago}" f"{last_update_local}" f"{tokens_display}" f"{cost_ ...[truncated 3263 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/agents_cli_monitor.py:357
Finding

Full sensitive log access is enabled by default despite poll-only functionality

Content
View full analysis
None: cmd = ["openclaw", "logs", "--json", "--follow", "--plain", "--interval", "1000"] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True, bufsize=1) def _cleanup() -> None: if proc.poll() is None: proc.terminate() try: proc.wait(timeout=1) except subprocess.TimeoutExpired: proc.kill() atexit.register(_cleanup) try: while not stop_event.is_set(): line = proc.stdout.readline() if not line: if proc.poll() is not None: break continue try: payload = json.loads(line) except json.JSONDecodeError: continue session_id = extract_session_id(payload) if session_id: monitor.touch_session(session_id) finally: _cleanup() ``` ```python if not args.no_subscribe: log_thread = threading.Thread(target=tail_logs, args=(monitor, stop_event), daemon=True) log_thread.start() ``` ### Technical Analysis The monitor automatically executes `openclaw logs --json --follow` unless the user supplies `--no-subscribe`. The Skill documentation acknowledges that these logs may contain prompts, tool arguments, secrets, and personally identifiable information. Neverthele ...[truncated 2249 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/agents_cli_monitor.py:339
Finding

Untrusted session metadata can inject terminal control sequences

Content
View full analysis
0: parts.append(f"{row['cost']:<{col_widths['cost']}}") parts.extend([ f"{ellipsize(row['model'], col_widths['model']):<{col_widths['model']}}", f"{ellipsize(row['kind'], 10):<10}", ]) print(" ".join(parts)) ``` ### Technical Analysis The `key`, `model`, and `kind` values originate from OpenClaw session metadata and are sent to the terminal without removing ANSI escape sequences or C0/C1 control characters. `ellipsize()` limits Python character count but does not neutralize terminal commands. A malicious or compromised metadata source could include carriage returns, line erasure, cursor movement, OSC sequences, or other terminal controls. The terminal interprets those bytes as commands rather than visible text. This is distinct from the monitor's own intentional color sequences because externally sourced fie ...[truncated 1266 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/agents_canvas_snapshot.py:116
Finding

Gateway-provided status is embedded into generated HTML without escaping

Content
View full analysis
{status}" cost_cell = f"{html.escape(cost_display)}" if args.cost_per_1k > 0 else "" ``` ### Technical Analysis The session `status` value is accepted directly from the gateway whenever present. It is inserted into the HTML element body without `html.escape()`. Other textual fields such as the key, model, kind, and cost display are escaped, but status is not. The CSS class is selected through a fixed mapping and is not directly injectable, but the visible content between the `` tags remains unsafe. A status such as `` would become executable markup in the generated snapshot. Because the payload is written to disk and remains present until the next successful regeneration, this is a persistent HTML injection within the dashboard artifact. Exploitation requires control over, or compromise of, the gateway response or another upstream source of session status values. ### Attack Path 1. An attacker or compromised OpenClaw gateway supplies a session object with a malicious `status` string. 2. `fetch_sessions()` accepts the JSON response without schema or enum validation. 3. `render_html()` uses the supplied value rather than locally classifying the status. 4. The raw value is inserted between the status `` tags. 5. The generated HTML file is opened in a browser or presented through Canvas. 6. The browser parses and executes the injected ...[truncated 637 chars]
Remediation
View remediation
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs users to execute local shell commands and describes scripts that write HTML files and may use environment variables, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch weakens security review and consent boundaries because an agent may be induced to use shell, read environment-derived configuration, and write files without those capabilities being clearly surfaced in metadata.

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/agents_canvas_snapshot.py (reported line 56)May include surrounding context.

python
cmd += ["--agent", args.agent]
    if args.all_agents:
        cmd.append("--all-agents")
    out = subprocess.check_output(cmd, text=True)
    payload = json.loads(out)
    return payload.get("sessions", [])

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/agents_cli_monitor.py (reported line 163)May include surrounding context.

python
cmd += ["--agent", args.agent]
    if args.all_agents:
        cmd.append("--all-agents")
    out = subprocess.check_output(cmd, text=True)
    payload = json.loads(out)
    return payload.get("sessions", [])

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/agents_cli_monitor.py (reported line 183)May include surrounding context.

python
def tail_logs(monitor: SessionMonitor, stop_event: threading.Event) -> None:
    cmd = ["openclaw", "logs", "--json", "--follow", "--plain", "--interval", "1000"]
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True, bufsize=1)

    def _cleanup() -> None:
        if proc.poll() is None: