Back to skill

Security audit

Openclaw Godot Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Godot editor integration, but it deserves Review because it installs a persistent gateway extension that can mutate projects and exposes an under-protected HTTP control channel in some configurations.

Install only if you trust the local machine and Godot project, keep the bridge bound to localhost, do not expose the gateway port to shared or public networks, and use version control or backups before allowing scene saves, node deletion, input simulation, or script/project inspection. Review existing ~/.openclaw/extensions/godot contents before running the installer because it may overwrite files.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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 (1)

T07 · Tool Hijacking and Spoofing

Error
Location
extension/index.ts:83
Finding
Unauthenticated Legacy HTTP Control Plane Enables Godot Session Spoofing and Command Interception<![CDATA[ ## Vulnerability Details **File Location**: `extension/index.ts:83-85`, `extension/index.ts:104-106`, `extension/index.ts:114-139`, `extension/index.ts:161-204`, `extension/index.ts:207-224`, `extension/index.ts:255-263`, and `extension/index.ts:310-314` **Vulnerability Type**: Missing authentication and unrestricted cross-origin access on security-sensitive HTTP endpoints **Risk Level**: High ### Vulnerable Code ```ts function sendJson(res: ServerResponse, status: number, data: any) { res.statusCode = status; res.setHeader("Content-Type", "application/json"); res.setHeader("Access-Control-Allow-Origin", "*"); res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization"); res.end(JSON.stringify(data)); } ``` ```ts // Handle CORS preflight if (req.method === "OPTIONS") { res.setHeader("Access-Control-Allow-Origin", "*"); res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization"); res.statusCode = 204; res.end(); return true; } ``` ```ts case "register": { if (req.method !== "POST") { sendJson(res, 405, { error: "Method not allowed" }); return true; } const body = await readJsonBody(req); const { project, version, platform, tools } = body; const sessionId = generateId(); const session: GodotSession = { sessionId, registeredAt: Date.now(), lastHeartbeat: Date.now(), projectName: project || "Unknown", godotVersion: version || "Unknown", platform: platform || "GodotEditor", toolCount: tools || 0, pendingCommands: [], results: new Map(), }; sessions.set(sessionId, session); console.log(`[Godot] Registered: ${project} (${version}) - Session: ${sessionId}`); sendJson(res, 200, { sessionId, status: "connected" }); return true; } ``` ```ts case "poll": { const sessionId = url.searchParams.get("s ...[truncated 5810 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove the unauthenticated compatibility path** - Require `registerHttpRoute` with `auth: "plugin"`. - If legacy versions must remain supported, implement explicit authentication inside `handleGodotHttpRequest` before dispatching any endpoint. - Fail closed when the gateway cannot provide an authenticated route. 2. **Use per-session authentication** - Generate a cryptographically random session secret with `crypto.randomBytes()` or `crypto.randomUUID()`. - Require the secret for heartbeat, polling, and result submission. - Compare credentials using a timing-safe comparison where appropriate. - Rotate or invalidate credentials when sessions expire. 3. **Protect session identifiers and metadata** - Do not expose raw session IDs through an unauthenticated status endpoint. - Restrict status information to authorized administrative callers. - Return only the minimum metadata required for operation. 4. **Restrict CORS** - Replace `Access-Control-Allow-Origin: *` with an explicit allowlist of trusted local origins. - Do not enable cross-origin credentialed control-plane requests unless strictly necessary. - Reject untrusted `Origin` headers rather than merely omitting browser response headers. 5. **Reduce network exposure** - Bind the gateway endpoint to loopback by default. - Require authenticated TLS when remote access is necessary. - Document firewall requirements and prevent public-network exposure by default. 6. **Bind results to issued commands** - Record the expected session and command identifier when a command is queued. - Accept each result only from the authenticated session to which the command was assigned. - Reject unknown, duplicate, expired, or already-completed `toolCallId` values. - Add expiration and size limits for pending commands and stored results. 7. **Avoid implicit first-session selection** - Require explicit user selection when multiple ...[truncated 521 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description focuses on runtime capabilities for controlling the Godot Editor and manipulating project/editor state. The actual code chunk does not implement any of those editor-control behaviors. Instead, it performs local installation of an extension by copying files into ~/.openclaw/extensions/godot and prompting a gateway restart. That is a materially different primary purpose and introduces filesystem modification capabilities that are not described. This is not merely a supporting detail of editor control in the supplied chunk; the entire chunk is an installer, so the description does not accurately represent what this code actually does.

Skill Enumeration

Medium
Category
Agent Snooping
Content
openclaw godot status

# Check skill available
ls ~/.openclaw/workspace/skills/godot-plugin/SKILL.md
```

## Requirements
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill metadata frames usage as limited to trusted local projects, but the documentation explicitly supports a remote gateway mode for Telegram/Discord and other channels. This inconsistency can cause users to underestimate exposure, especially because the skill can control a live editor, read scripts/logs, capture screenshots, and perform destructive actions remotely.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The security guidance contradicts the meaning of disableModelInvocation by recommending 'true' while justifying it with autonomous AI behavior, even though 'true' blocks auto-invocation. Misstated security semantics can lead operators to configure the skill incorrectly, potentially enabling unintended model-triggered access to editor-control capabilities.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
### Recommendation: **`true`**

**Reason:** During Godot development, it's useful for AI to autonomously perform supporting tasks like checking scene tree, taking screenshots, and inspecting nodes.

**When to use `true`:** For sensitive tools (payments, deletions, message sending, etc.)
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The godot_execute tool exposes powerful editor actions, including explicitly destructive ones like node.delete and scene/resource modifications, without any built-in confirmation, policy gate, or allowlist for sensitive operations. In an agent-driven workflow, this creates a real risk that a mistaken prompt, prompt injection, or model error can irreversibly modify or delete project assets without the user knowingly approving the action.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
The file includes a Korean-only summary line alongside English content, but does not state whether multilingual presentation is intentional, optional, or targeted to a specific locale. Under the policy rule, language-specific content can be a concern when a skill imposes or assumes a locale without user opt-in or clear justification.

Intent-Code Divergence

Low
Confidence
93% confidence
Finding
The README first states the project is under the MIT License at L71-L73, then immediately states it has been licensed under Apache-2.0 since initial release at L75-L77. These two documentation statements actively contradict each other, creating a clear divergence in declared intent/documentation even though the code behavior is not implicated.

Missing User Warnings

Low
Confidence
93% confidence
Finding
The script recursively copies the extension into a fixed user extension directory without checking for pre-existing files, prompting the user, or creating a backup. That can unintentionally overwrite an existing Godot/OpenClaw extension installation or locally modified files, causing loss of user changes or installation of unintended content.

Static analysis

No suspicious patterns detected.