Back to skill

Security audit

OpenClaw Diagnostics

Security checks for vulnerabilities and agentic risk

Overview

This troubleshooting skill is not clearly malicious, but it needs review because it can expose raw OpenClaw config/log data and uses an unsafe update workflow.

Install only if you are comfortable with the agent reading local OpenClaw configuration and recent logs. Review and redact diagnostic output before sharing it, especially tokens, API keys, webhook URLs, phone numbers, user IDs, and message content. Avoid the knowledge-base update commands unless tsx is pinned or installed from a trusted lockfile, and treat any updated documentation snapshot as untrusted reference text.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/get-diagnostic-info.sh:5
Finding

Unredacted OpenClaw Configuration and Log Disclosure

Content
View full analysis
/dev/null; then openclaw logs -n $LOG_LINES 2>/dev/null || echo "❌ Unable to retrieve logs" else echo "❌ The openclaw command is unavailable" fi } case "${1:-all}" in config) get_config ;; logs) get_logs ;; status) get_status ;; all|*) get_config echo "" get_status echo "" get_logs ;; esac ``` The default diagnostic workflow is also explicitly recommended in `SKILL.md` lines 15–25 and `references/common-issues.md` lines 8–12. ### Technical Analysis The script outputs the entire `~/.openclaw/openclaw.json` file through `cat` and retrieves the most recent 100 log lines without applying any redaction or field selection. OpenClaw configuration and logs may contain authentication tokens, API keys, bot credentials, webhook URLs, account identifiers, message content, internal addresses, or other sensitive operational data. Because the default argument is `all`, invoking the script without an explicit mode exposes both the complete configuration and recent logs. The project does not contain an explicit mechanism that transmits this output to an attacker. However, when the script is run as part of an AI-assisted diagnostic workflow, its output can enter the Agent context, conversation transcript, telemetry, or a user-visible response. This v ...[truncated 1333 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:90
Finding

Unpinned Remote Package Execution Through npx

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/update-knowledge-base.ts:112
Finding

Unvalidated Sitemap URLs Enable Server-Side Request Abuse and Persistent Knowledge-Base Poisoning

Content
View full analysis
{ console.log('📡 Fetching sitemap...'); const response = await fetch(SITEMAP_URL); const xml = await response.text(); const entries: SitemapEntry[] = []; const urlBlockRegex = /([\s\S]*?)<\/url>/g; let match; while ((match = urlBlockRegex.exec(xml)) !== null) { const block = match[1]; const locMatch = /(.*?)<\/loc>/.exec(block); const lastmodMatch = /(.*?)<\/lastmod>/.exec(block); if (locMatch?.[1]) { const loc = locMatch[1].trim(); if (!EXCLUDED_PATTERNS.some(p => p.test(loc))) { entries.push({ loc, lastmod: lastmodMatch?.[1]?.trim() || null, }); } } } console.log(`📄 Found ${entries.length} pages`); return entries; } async function fetchPage(url: string): Promise { const response = await fetch(url); if (!response.ok) throw new Error(`Failed to fetch ${url}`); return response.text(); } ``` ```ts async function performUpdate(): Promise { console.log('🔄 Starting knowledge base update...'); const entries = await fetchSitemap(); const fingerprint = buildFingerprint(entries); const newHash = computeHash(fingerprint); const newBundle: Bundle = { meta: { snapshotDate: new Date().toISOString(), pageCount: 0, sizeBytes: 0 }, index: [], pages: {}, }; const CONCURRENCY = 5; for (let i = 0; i < entries.length; i += CONCURRENCY) { const batch = entries.slice(i, i + CONCURRENCY); const results = await Promise.allSettled( batch.map(async (entry ...[truncated 4854 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (33)

YARA rule 'agent_skill_credential_exfiltration_webhook': AI agent skill credential harvesting followed by webhook or external exfiltration [agent_skills]

Critical
Category
YARA Match
Confidence
85% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · assets/default-snapshot.json (reported line 2023)May include surrounding context.

json
nect to a gateway elsewhere.\nRemote mode does not install or modify anything on the remote host.\nWhat you set:\n\nRemote gateway URL (ws://...)\nToken if remote gateway auth is required (recommended)\n\nIf gateway is loopback-only, use SSH tunneling or a tailnet.\nDiscovery hints:\n\nmacOS: Bonjour (dns-sd)\nLinux: Avahi (avahi-browse)\n\n## ​Auth and model options\n\nAnthropic API key\nUses `ANTHROPIC_API_KEY` if present or prompts for a key, then saves it for daemon use.\nAnthropic OAuth (Claude Code CLI)\n\n- macOS: checks Keychain item “Claude Code-credentials”\n\n- Linux and Windows: reuses `~/.claude/.credentials.json` if present\n\nOn macOS, choose “Always Allow” so launchd starts do not block.\nAnthropic token (setup-token paste)\nRun `claude setup-token` on any machine, then paste the token.\nYou can name it; blank uses default.\nOpenAI Code subscription (Codex CLI reuse)\nIf `~/.codex/auth.json` exists, the wizard can reuse it.\nOpenAI Code subscription (OAuth)\nB

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Location:** `assets/default-snapshot.json`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Location:** `assets/default-snapshot.json`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Location:** `assets/default-snapshot.json`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
npx tsx scripts/update-knowledge-base.ts --check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
npx tsx scripts/update-knowledge-base.ts --check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
npx tsx scripts/update-knowledge-base.ts --check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
npx tsx scripts/update-knowledge-base.ts --check

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · assets/default-snapshot.json (reported line 10)May include surrounding context.

json
{
  "meta": {
    "snapshotDate": "2026-03-06T01:38:50.377Z",
    "pageCount": 335,
    "sizeBytes": 3244483
  },
  "index": [
    {
      "slug": "c35ad50f",
      "title": "​Auth Credential Semantics",
      "url": "https://docs.openclaw.ai/auth-credential-semantics",
      "description": "Documentation for ​Auth Credential Semantics"
    },
    {
      "slug": "87e3285b",
      "title": "​Auth monitoring",
      "url": "https://docs.openclaw.ai/automation/auth-monitoring",
      "description": "Documentation for ​Auth monitoring"
    },
    {
      "slug": "b239629c",
      "title": "​Cron jobs (Gateway scheduler)",
      "url": "https://docs.openclaw.ai/automation/cron-jobs",
      "description": "Documentation for ​Cron jobs (Gateway scheduler)"

YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · assets/default-snapshot.json (reported line 2020)May include surrounding context.

json
when possible; if posting raw JSON, follow these rules:\n**Payload structure:**\nCopy\n```\n{\n  channel_id: &quot;&lt;channelId&gt;&quot;,\n  message: &quot;Choose an option:&quot;,\n  props: {\n    attachments: [\n      {\n        actions: [\n          {\n            id: &quot;mybutton01&quot;, // alphanumeric only — see below\n            type: &quot;button&quot;, // required, or clicks are silently ignored\n            name: &quot;Approve&quot;, // display label\n            style: &quot;primary&quot;, // optional: &quot;default&quot;, &quot;primary&quot;, &quot;danger&quot;\n            integration: {\n              url: &quot;http://localhost:18789/mattermost/interactions/default&quot;,\n              context: {\n                action_id: &quot;mybutton01&quot;, // must match button id (for name lookup)\n                action: &quot;approve&quot;,\n                // ... any custom fields ...\n                _token: &quot;&lt;hmac&gt;&quot;, // see HMAC section below\n

YARA rule 'offensive_tool_references': References to well-known offensive security tools [hacktools]

High
Category
YARA Match
Confidence
70% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · assets/default-snapshot.json (reported line 2180)May include surrounding context.

json
\n```\n\nIPv6 has separate tables. Add a matching policy in `/etc/ufw/after6.rules` if\nDocker IPv6 is enabled.\nAvoid hardcoding interface names like `eth0` in docs snippets. Interface names\nvary across VPS images (`ens3`, `enp*`, etc.) and mismatches can accidentally\nskip your deny rule.\nQuick validation after reload:\nCopy\n```\nufw reload\niptables -S DOCKER-USER\nip6tables -S DOCKER-USER\nnmap -sT -p 1-65535 &lt;public-ip&gt; --open\n```\n\nExpected external ports should be only what you intentionally expose (for most\nsetups: SSH + your reverse proxy ports).\n\n### ​0.4.2) mDNS/Bonjour discovery (information disclosure)\n\nThe Gateway broadcasts its presence via mDNS (`_openclaw-gw._tcp` on port 5353) for local device discovery. In full mode, this includes TXT records that may expose operational details:\n\n- `cliPath`: full filesystem path to the CLI binary (reveals username and install location)\n\n- `sshPort`: advertises SSH availability on the host\n\n- `displayName`, `l

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · assets/default-snapshot.json (reported line 2228)May include surrounding context.

json
ice by default. Use a **system**\nservice for shared or always-on servers. The full unit example and guidance\nlive in the [Gateway runbook](/gateway).\nMinimal setup:\nCreate `~/.config/systemd/user/openclaw-gateway[-&lt;profile&gt;].service`:\nCopy\n```\n[Unit]\nDescription=OpenClaw Gateway (profile: &lt;profile&gt;, v&lt;version&gt;)\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nExecStart=/usr/local/bin/openclaw gateway --port 18789\nRestart=always\nRestartSec=5\n\n[Install]\nWantedBy=default.target\n```\n\nEnable it:\nCopy\n```\nsystemctl --user enable --now openclaw-gateway[-&lt;profile&gt;].service\n```\n[macOS App](/platforms/macos)[Windows (WSL2)](/platforms/windows)⌘I",
    "53f2f802": "Gateway on macOS - OpenClaw[Skip to main content](#content-area)[OpenClaw home page](/)EnglishSearch...⌘KSearch...NavigationmacOS companion appGateway on macOS[Get started](/)[Install](/install)[Channels](/channels)[Agents](/pi)[Tools](/tools)[Models](/providers)[P

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · assets/default-snapshot.json (reported line 2322)May include surrounding context.

json
ET /snapshot`, `POST /screenshot`\n\n- Actions: `POST /navigate`, `POST /act`\n\n- Hooks: `POST /hooks/file-chooser`, `POST /hooks/dialog`\n\n- Downloads: `POST /download`, `POST /wait/download`\n\n- Debugging: `GET /console`, `POST /pdf`\n\n- Debugging: `GET /errors`, `GET /requests`, `POST /trace/start`, `POST /trace/stop`, `POST /highlight`\n\n- Network: `POST /response/body`\n\n- State: `GET /cookies`, `POST /cookies/set`, `POST /cookies/clear`\n\n- State: `GET /storage/:kind`, `POST /storage/:kind/set`, `POST /storage/:kind/clear`\n\n- Settings: `POST /set/offline`, `POST /set/headers`, `POST /set/credentials`, `POST /set/geolocation`, `POST /set/media`, `POST /set/timezone`, `POST /set/locale`, `POST /set/device`\n\nAll endpoints accept `?profile=&lt;name&gt;`.\nIf gateway auth is configured, browser HTTP routes require auth too:\n\n- `Authorization: Bearer &lt;gateway token&gt;`\n\n- `x-openclaw-password: &lt;gateway password&gt;` or HTTP Basic auth with that password\n\n### ​

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description lists generic triggers such as "diagnose," "troubleshoot," "config problem," and "why no reply," which are common phrases users may say in many unrelated contexts. The file does not provide constraints, exclusions, or negative examples to clearly limit when this skill should activate.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Line L008 describes the skill as using built-in AI 'without external dependencies.' However, later in the same document the skill explicitly instructs users to run npx tsx and notes a network requirement to update the knowledge base, which contradicts the no-external-dependencies claim in intent-level documentation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs running diagnostic scripts that gather configuration, status, and logs without warning that those artifacts may contain secrets, tokens, identifiers, or sensitive operational data. In troubleshooting contexts, users often paste outputs into chats or tickets, so the lack of a sanitization warning materially increases the chance of credential or privacy leakage.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding

The skill instructs users to run npx tsx without pinning an exact package version, which can fetch and execute whatever version resolves at runtime. In a security-sensitive troubleshooting skill, this creates a supply-chain risk if the upstream package changes, is compromised, or differs across environments.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding

This command again relies on unpinned npx tsx, which can dynamically retrieve and execute external code. Because the skill frames this as a normal maintenance action, users may run it without realizing they are accepting remote code execution risk from the package ecosystem.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding

The force-update path also uses unpinned npx tsx, preserving the same supply-chain exposure while encouraging execution during urgent maintenance. Forced update workflows are especially risky because they may bypass caution and run newly retrieved code immediately.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_resource_identifier, suspicious.exposed_secret_literal, suspicious.install_untrusted_source

Plaintext HTTP endpoint targets a CGNAT/Tailscale-range address.

Critical
Code
suspicious.exposed_resource_identifier
Location
assets/default-snapshot.json:2044

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
assets/default-snapshot.json:2141

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
assets/default-snapshot.json:2027