Back to skill

Security audit

Server Health

Security checks for vulnerabilities and agentic risk

Overview

This is a read-only server health skill that exposes operational details, but the behavior is disclosed and aligned with its monitoring purpose.

Install this only where server health details are appropriate for the caller. Treat its output as administrator diagnostic information, especially if connected to Telegram or automation, because it can reveal process names, OpenClaw port/version/model settings, service state, Docker container count, and session activity.

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

other

Note
Location
server-health.sh:44
Finding

Excessive Disclosure of Privileged Host and OpenClaw Operational Metadata

Content
View full analysis
1 {printf "%-12s %3d%% %5dMB\n", $11, int($3), int($6/1024)}' | head -3 } get_openclaw_pid() { pgrep -f "openclaw.*gateway" | head -1 || echo "" } get_openclaw_version() { # Get version from package.json instead of CLI (CLI can hang) if [[ -f /usr/lib/node_modules/openclaw/package.json ]]; then jq -r '.version // "unknown"' /usr/lib/node_modules/openclaw/package.json 2>/dev/null else echo "unknown" fi } get_openclaw_config() { if [[ -f /root/.openclaw/openclaw.json ]]; then local port=$(jq -r '.gateway.port // 18789' /root/.openclaw/openclaw.json 2>/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 } get_docker_containers() { if command -v docker &>/dev/null; then docker ps -q 2>/dev/null | wc -l else echo "0" fi } ``` The standard output additionally exposes session metadata: ```bash # Simplified - just count session files local sessions=$(ls /root/.openclaw/agents/main/sessions/*.json 2>/dev/null | wc -l || echo "0") ``` ### Technical Analysis The script gathers system-wide process information, identifies the OpenClaw gateway process, reads package and configuration data, queries Docker, and counts session files under a root-owned directory. These operations are read-only and broadly align with the stated monitoring purpose. However, ...[truncated 2538 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

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
94% confidence
Finding

The skill explicitly displays operational details such as running services, gateway status, port numbers, model configuration, process names, and session activity, but the description provides no warning that this output may contain sensitive infrastructure information. If shared through Telegram, logs, screenshots, or automation outputs, these details can aid reconnaissance and expose internal architecture to unauthorized viewers.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script reads sensitive OpenClaw configuration from /root/.openclaw/openclaw.json, including gateway port, primary model, and fallback models, and later enumerates session files under /root/.openclaw/agents/main/sessions. In a skill designed for Telegram or CLI health checks, this information may be exposed to untrusted chat recipients or lower-trust operators, creating unnecessary disclosure of internal configuration and agent activity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file advertises reporting of top processes, OpenClaw gateway status, model configuration, and service status, and the example output includes process names, PID, port, version, and model identifiers. The description does not warn users that running the skill may reveal operational or environment details that could be sensitive when shared or logged.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.