Back to skill

Security audit

Gateway Restart Profiler

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent Gateway restart profiler, but it asks agents to run it with elevated privileges and advertises an elevated Windows script that is not included for review.

Install only if you are comfortable with a profiler that restarts OpenClaw Gateway and may interrupt active work. Prefer running the Linux script without elevated privileges under the OpenClaw user, and do not rely on the advertised Windows path unless the missing PowerShell script is supplied and reviewed. Treat generated HTML reports as network-dependent because they load Chart.js from a CDN.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:33
Finding

Profiler Is Instructed to Run with Unnecessary Administrative Privileges

Content
View full analysis
/scripts/gateway-profile.ps1", elevated=true) **Linux:** exec(command="bash /scripts/gateway-profile.sh", elevated=true) ``` ### Technical Analysis The documented invocation directs the agent to execute the profiler with `elevated=true` on both Windows and Linux. The reviewed Linux implementation only reads OpenClaw logs, stops and starts the Gateway, creates a temporary file, and writes reports. No reviewed operation establishes a legitimate need for administrator or root privileges. This violates the principle of least privilege. It also magnifies the consequences of any future script vulnerability, package modification, path substitution, or unauthorized change to the skill directory. On Windows, the command additionally disables PowerShell execution-policy enforcement for the referenced script. The advertised PowerShell script was not present in the audited project, so its behavior could not be verified. Instructing an agent to run an absent and unaudited script with elevation further increases the risk associated with a substituted file. ### Attack Path 1. An attacker obtains the ability to modify the skill script, replace the skill directory, or cause the `` placeholder to resolve to an attacker-controlled location. 2. The user requests Gateway restart profiling. 3. Following `SKILL.md`, the agent launches the referenced script with `elevated=true`. 4. The attacker-controlled script executes with root privileges on Linux or administrator privileges on Windows. 5. The script can then modify protected files, access data belonging to other users, alter system configuration, or install persistent components. The modification or path-control prerequisite is required; the reviewed Linux sc ...[truncated 586 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/gateway-profile.sh:334
Finding

Generated Report Executes Third-Party JavaScript Without Integrity Verification

Content
View full analysis
``` ### Technical Analysis Every generated HTML report references Chart.js directly from jsDelivr. Although the URL specifies version `4.4.0` and uses HTTPS, the script element does not contain a Subresource Integrity hash. Consequently, the effective JavaScript executed when a user opens the report is not fully represented by the audited skill package. If the CDN account, package distribution path, or delivery infrastructure is compromised, modified JavaScript can execute in the report's browser context. The report also makes an external request whenever it is opened, contrary to the expected behavior of a self-contained local performance report. The remote script does not execute as a shell command and does not inherently receive root privileges. Its direct permissions are constrained by the browser security model and the context in which the local HTML report is opened. ### Attack Path 1. An attacker compromises or otherwise controls the JavaScript returned by the referenced CDN URL or its upstream package artifact. 2. The profiler generates an HTML report containing the remote script reference. 3. A user opens the generated report while connected to the network. 4. The browser downloads the altered dependency because no integrity hash is available to reject modified content. 5. The attacker-controlled JavaScript executes in the report's browser context. 6. It can falsify report contents, issue external network requests, and disclose information available within the generated document, such as displayed log paths and performance results. Broader host compromise would require an additional browser vulnerability or unsafe browser configuration and is not established ...[truncated 542 chars]
Remediation
View remediation
``` 3. Generate the integrity value from a trusted copy and verify it as part of release automation; do not use the placeholder shown above. 4. Apply a restrictive Content Security Policy to generated reports, limiting script sources and outbound connections. 5. Prefer a network-independent report so opening a local diagnostic artifact does not contact an external service. 6. Document any remaining external-resource behavior for users. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is presented as a profiling/reporting tool, but its documented behavior includes actively stopping and starting the Gateway and requesting elevated execution. That mismatch is security-relevant because an operator or agent may invoke it expecting passive diagnostics, while it actually performs disruptive privileged actions that can cause downtime or affect production state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The invocation guidance tells the agent to run the scripts with elevated privileges and notes that the Gateway will be restarted, but it lacks an explicit user-facing warning and consent step before performing the restart. In an agentic context, this increases the risk of unexpected service interruption, especially if triggered from a vague request like 'analyze startup performance'.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script unconditionally stops and restarts the Gateway as part of profiling, which changes service state and can disrupt active workloads. Because the usage text and comments do not clearly warn about this side effect or require explicit confirmation, an operator may run it expecting passive analysis and unintentionally cause downtime.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The generated HTML report imports Chart.js from a public CDN at view time, creating an undeclared network dependency and exposing report viewers to supply-chain and integrity risks. If the CDN content is tampered with, blocked, or replaced, opening the local report could execute untrusted JavaScript in the browser.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

User-visible strings throughout the script, including comments, status output, and generated HTML, are fixed in Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy issue unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.