Back to skill

Security audit

rl-runtime-guard

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, local, and disclosed, but it automatically injects mandatory system-level instructions that can redirect an agent's behavior beyond ordinary advisory guidance.

Install only if you want a guard that can alter agent requests at system-instruction priority when its heuristics trigger. Review the Chinese-only prompts and threshold settings first, and keep audit logging disabled unless you intentionally want local metadata logs.

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)

T01 · Skill Instruction Hijacking

Error
Location
handler.mjs:109
Finding

Privileged System-Prompt Injection Alters Agent Behavior

Content
View full analysis
m.role === 'system'); const insertIdx = lastSystemIdx >= 0 ? msgs.length - 1 - lastSystemIdx + 1 : 0; msgs.splice(insertIdx, 0, { role: 'system', content: guardPrompt, name: 'rl-runtime-guard', }); } else if (typeof requestData.systemPrompt === 'string') { requestData.systemPrompt = guardPrompt + '\n\n' + requestData.systemPrompt; } ``` The injected `guardPrompt` is assembled by the prompt-builder functions at lines 109-152. Those prompts impose mandatory planning, response, tool-use, path, command-length, and stopping requirements. ### Technical Analysis The handler elevates Skill-controlled advisory text to the privileged system-instruction level. When `requestData.messages` is present, it inserts a new message with `role: 'system'`. For other supported request formats, it prepends the generated instructions to the existing system prompt or context. The injected prompts are not merely informational warnings. They contain mandatory workflow directives, prohibited behaviors, forced preliminary responses, tool-use restrictions, and stopping conditions. They also state that violations will cause tool calls to fail, although this handler implements no corresponding enforcement. Activation is based on broad heuristics, including message length, selected multi-step markers, similarity to earlier user messages, and path-like strings. Consequently, an ordinary user message can cause Skill-authored instructions to gain system-level priority without explicit per-request consent. The behavior is disclosed as prompt augmentation, and no hidden remote payload o ...[truncated 1776 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/audit-log.md (reported line 69)May include surrounding context.

Purging old logs

bash
rm ~/.openclaw/logs/audit/rl-guard-decisions.jsonl

This is a permanent deletion. Make sure no compliance or debug process depends on the log first.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/disabling.md (reported line 86)May include surrounding context.

Purging old logs

bash
rm ~/.openclaw/logs/audit/rl-guard-decisions.jsonl

This is a permanent deletion. Make sure no compliance or debug process depends on the log first.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The runtime guard prompts injected into requests are written entirely in Chinese, which forces the model's internal instruction context into a specific language regardless of the user's preferred language. This is a natural-language policy issue because the file does not offer any language selection, fallback, or justification for restricting prompts to Chinese.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/audit-log.md (reported line 79)May include surrounding context.

If you do enable audit logging, restrict file permissions:

bash
chmod 600 ~/.openclaw/logs/audit/rl-guard-decisions.jsonl

The skill does not set restrictive permissions automatically — that is the operator's responsibility.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file includes a shell command to delete an audit log file (rm ~/.openclaw/logs/audit/rl-guard-decisions.jsonl) but does not warn that the action permanently removes audit history. For markdown files, SQP-2 applies when the skill description omits warnings about behaviors that could affect user data or system integrity, and deleting audit logs is such an operation.

Content

No source excerpt is available for this finding.