Back to skill

Security audit

server-health

Security checks for vulnerabilities and agentic risk

Overview

This is a read-only health-check skill, but it can expose root-scoped OpenClaw configuration, session activity counts, process names, and service details through broad CLI or Telegram use.

Install only where invocation is limited to trusted administrators. Do not expose this skill through public or shared Telegram/agent endpoints unless output is redacted, because it can reveal process names, service state, container counts, OpenClaw port/model configuration, and session activity metadata.

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

other

Note
Location
server-health.sh:29
Finding

System and Service Reconnaissance Exposes Operational Metadata

Content
View full analysis
1 {printf "%-12s %3d%% %5dMB\n", $11, int($3), int($6/1024)}' | head -3 } ``` ```bash get_openclaw_pid() { pgrep -f "openclaw.*gateway" | head -1 || echo "" } ``` ```bash check_service() { local service=$1 if systemctl is-active --quiet "$service" 2>/dev/null; then echo "✅" elif pgrep -x "$service" >/dev/null 2>&1; then echo "✅" else echo "❌" fi } get_docker_containers() { if command -v docker &>/dev/null; then docker ps -q 2>/dev/null | wc -l else echo "0" fi } ``` ### Technical Analysis The script performs systematic enumeration of host processes, the OpenClaw gateway, Docker containers, and system services. This behavior is consistent with the advertised health-monitoring purpose and does not modify the host. Nevertheless, the generated output discloses operational information that may be sensitive when returned through a remotely accessible agent or messaging integration. The exposed information can include: - Names and resource consumption of high-CPU processes - Whether the OpenClaw gateway is running - The gateway process identifier - Whether selected system services are active - The number of running Docker containers - Host resource utilization and uptime The script does not implement authorization, redaction, or output-recipient validation. Security therefore depends entirely on the controls imposed by the surrounding agent and execution environment. ### Attack Path 1. An attacker obtains permission to invoke the skill through an exposed or insufficiently restricted agent interface. 2. The attacker runs `server-health.sh` with the standard or JSON mode. 3. The ...[truncated 1138 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Note
Location
server-health.sh:70
Finding

Hard-Coded Access to Root-Scoped OpenClaw Configuration and Session Metadata

Content
View full analysis
/dev/null) local model=$(jq -r '.agents.defaults.model.primary // "unknown"' /root/.openclaw/openclaw.json 2>/dev/null) local fallbacks=$(jq -r '.agents.defaults.model.fallbacks // [] | map(split("/")[1] // .) | join(" → ")' /root/.openclaw/openclaw.json 2>/dev/null) echo "${port} ${model} ${fallbacks}" else echo "18789 unknown " fi } ``` ```bash echo "📊 SESSIONS" # Simplified - just count session files local sessions=$(ls /root/.openclaw/agents/main/sessions/*.json 2>/dev/null | wc -l || echo "0") echo "Active: ${sessions}" ``` ### Technical Analysis The script uses hard-coded paths under `/root/.openclaw/` to read the OpenClaw gateway port, primary model, fallback models, and enumerate session files. These paths ordinarily contain root-scoped application data. The script does not bypass Unix file permissions or independently elevate privileges. It can read these files only when its existing execution identity already has sufficient access. However, if the skill is executed as root or by an account with access to the OpenClaw directory, it exposes privileged configuration and activity metadata through its normal output. Hard-coding `/root` also encourages execution with elevated privileges and prevents deployment under a dedicated, least-privileged service account. Although session file contents are not read, file enumeration reveals session activity. ### Attack Path 1. The skill is installed in an agent environment that executes skills as root or another account able to read `/root/.openclaw/`. 2. An attacker or unauthorized user obta ...[truncated 1144 chars]
Remediation
View remediation
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Context Leakage

High
Category
Data Exfiltration
Confidence
75% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

Scanner excerpt · server-health.sh (reported line 105)May include surrounding context.

sh
# Get from session status - parse the output
    local status=$(openclaw status 2>/dev/null || echo "")
    
    # Try to extract context and tokens
    local context=$(echo "$status" | grep -oP 'Context:.*?\K\d+k/\d+k \(\d+%\)' | head -1 || echo "N/A")
    local tokens=$(echo "$status" | grep -oP 'Tokens:.*?\K\d+ in / \d+ out' | head -1 || echo "N/A")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The feature list advertises disclosure of top processes, gateway status, model configuration, and running services without warning that this output may reveal sensitive infrastructure and operational details. An unsuspecting user or downstream automation could expose host fingerprints, service inventory, internal ports, versioning, and model stack information that aids reconnaissance.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README recommends using this skill whenever a user asks about general system health, resource usage, or OpenClaw status, which is broad enough to trigger on routine or ambiguous requests. Because the skill exposes process, service, model, session, and gateway details, overly permissive invocation guidance can cause unnecessary disclosure of sensitive operational information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file mixes primarily English documentation with a critical permissions and warning section written only in Chinese. Because the file does not offer a language choice or justify the locale restriction, it can violate language/locale policy by forcing some users to rely on untranslated safety-relevant content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script reads /root/.openclaw/openclaw.json and exposes application-specific configuration such as gateway port, primary model, and fallback models. In a server-health skill, this goes beyond generic host telemetry and can disclose sensitive operational metadata to chat/CLI users who may not need access to OpenClaw internals.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill accesses root-owned OpenClaw configuration without warning the user that potentially sensitive local data will be read and displayed. In an agent skill designed for Telegram or CLI health checks, silent disclosure of internal configuration increases the chance of unintended exposure to remote requesters or lower-trust operators.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script enumerates /root/.openclaw/agents/main/sessions/*.json and reports session activity metadata without notice. Even reporting only counts can leak whether the system is actively used, and the direct access pattern to root session storage is inappropriate for a general health-check skill exposed via Telegram or similar interfaces.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

Helper functions and comments indicate the skill intends to retrieve session count, heartbeat, last activity, context, and token usage from openclaw status. In actual behavior, output_standard never calls these functions, hardcodes usage to N/A, and reports sessions by counting files in a root-owned directory, so the implemented behavior diverges from the documented OpenClaw status reporting intent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The comments say 'Get usage info' and 'Simplified - just count session files', implying meaningful status retrieval, yet the code sets usage="N/A|N/A" and never calls the parsing helpers. This is an active contradiction between the documented intent and the executed behavior for OpenClaw session/model reporting.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.