Back to skill

Security audit

Moses Modes

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed prompt-governance tool, but it gives persistent, agent-wide behavior control with an unrestricted mode and unclear logging/privacy limits.

Review this before installing because it can affect agent behavior across tasks through persistent mode state. Only use it where trusted operators control the governance state, avoid the unrestricted mode for sensitive work, and require clear logging and privacy limits before enabling audit or growth-log behavior.

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
SKILL.md:20
Finding
Persistent State-Controlled Agent Instruction Hijacking<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:3` - `SKILL.md:20-23` - `references/modes.md:3-7` - `references/modes.md:27-31` - `references/modes.md:45-49` **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: High ### Vulnerable Code Snippets `SKILL.md:3`: ```yaml description: "MO§ES™ Governance Modes — Injects behavioral constraints from the active mode into all agent prompts. 8 modes: high-security, high-integrity, creative, research, self-growth, problem-solving, idk, unrestricted. Part of the moses-governance bundle. Patent pending Serial No. 63/877,177." ``` `SKILL.md:20-23`: ```markdown Load active mode from `~/.openclaw/governance/state.json` before every action. Apply the constraints below as governance guardrails. These constraints block prohibited action categories (e.g. speculative responses in High Security, unverified transactions in High Integrity) — they do not override core task instructions or general operator requests outside the prohibited categories. > **Dependency:** Reads `~/.openclaw/governance/state.json` (declared in `stateDirs`). The `/govern` command calls `init_state.py` from the **moses-governance** skill bundle (declared in `requires`). No secrets or credentials required. ``` `references/modes.md:3-7`: ```markdown ## High Security **Priority:** Security first. **Use when:** Financial operations, sensitive data, production systems, anything where a mistake costs real money or exposes real risk. **Constraints:** Verify all claims. Flag exposure risks. Require confirmation before destructive actions. Require confirmation before outbound transfers. Log full reasoning chain. No external resource access without approval. **Prohibited:** Speculative responses without evidence. Executing transactions without confirmation. Transmitting sensitive data without approval. ``` `references/modes.md:27-31`: ```markdown ## Self Growth **Priority:** Learning first. **Use when:** Training, capability ...[truncated 3815 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the requirement to inject mode instructions into every agent prompt. Apply policy guidance only to the specific task for which the operator explicitly selected it. 2. Eliminate the “None (Unrestricted)” mode or redefine it so that it cannot weaken platform, system, developer, or safety constraints. 3. Replace “Log full reasoning chain” with a requirement for concise decision summaries that do not expose hidden chain-of-thought or sensitive intermediate reasoning. 4. Remove instructions to maintain a growth log or reflect on prior interactions unless a separately authorized, privacy-reviewed storage mechanism is used. 5. Validate `state.json` against a strict allowlist and schema. Reject unknown modes, unexpected fields, malformed content, and instruction text supplied directly through state. 6. Treat the state file strictly as an enum selector. Store fixed, reviewed mode definitions in the skill rather than loading arbitrary behavioral text from writable state. 7. Require explicit per-task confirmation before applying a mode that changes tool access, outbound actions, data retention, or logging. 8. Define clear instruction precedence stating that mode guidance can never override system instructions, platform safety controls, access controls, privacy requirements, or explicit user intent. 9. Pin and independently audit the `moses-governance` dependency, especially `init_state.py`, before relying on it to manage security-sensitive persistent state. 10. Record only the selected mode and a sanitized action summary for auditing; do not record hidden reasoning, secrets, credentials, or unrelated conversation history. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Missing User Warnings

High
Confidence
97% confidence
Finding
The 'None (Unrestricted)' mode states 'No behavioral constraints' and says the operator accepts responsibility, but it does not provide a concrete warning describing likely safety, privacy, security, or operational consequences. Because this skill is a governance mechanism that can affect all agent prompts, presenting an unrestricted bypass without explicit risk disclosure makes it easier to disable protections casually or without informed consent.

Ssd 1

High
Confidence
98% confidence
Finding
A mode whose semantics are 'No behavioral constraints' functions as a built-in safety bypass. In the context of a prompt-governance skill, this can neutralize all mode-based safeguards for sensitive actions, increasing the chance of harmful outputs, policy evasion, insecure handling of data, or unsafe tool use if integrated elsewhere.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The mode catalog defines priorities and example use cases but does not specify authoritative activation rules, precedence, or guardrails for who may select a mode and under what conditions. In a governance layer that injects behavioral constraints into all agent prompts, this ambiguity can let operators or downstream logic choose an inappropriately weak mode for high-risk tasks, undermining expected safety controls.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## High Security
**Priority:** Security first.
**Use when:** Financial operations, sensitive data, production systems, anything where a mistake costs real money or exposes real risk.
**Constraints:** Verify all claims. Flag exposure risks. Require confirmation before destructive actions. Require confirmation before outbound transfers. Log full reasoning chain. No external resource access without approval.
**Prohibited:** Speculative responses without evidence. Executing transactions without confirmation. Transmitting sensitive data without approval.

## High Integrity
Confidence
75% 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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## High Security
**Priority:** Security first.
**Use when:** Financial operations, sensitive data, production systems, anything where a mistake costs real money or exposes real risk.
**Constraints:** Verify all claims. Flag exposure risks. Require confirmation before destructive actions. Require confirmation before outbound transfers. Log full reasoning chain. No external resource access without approval.
**Prohibited:** Speculative responses without evidence. Executing transactions without confirmation. Transmitting sensitive data without approval.

## High Integrity
Confidence
75% 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.

Ssd 3

Medium
Confidence
94% confidence
Finding
The instruction to 'Log full reasoning chain' creates a risk of storing internal reasoning and potentially sensitive user or system data in logs. Such logs can expose secrets, personal data, security-relevant deliberation, or proprietary context, and they may be retrievable by operators, other systems, or attackers if logging controls are weak.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**Priority:** Security first.
**Use when:** Financial operations, sensitive data, production systems, anything where a mistake costs real money or exposes real risk.
**Constraints:** Verify all claims. Flag exposure risks. Require confirmation before destructive actions. Require confirmation before outbound transfers. Log full reasoning chain. No external resource access without approval.
**Prohibited:** Speculative responses without evidence. Executing transactions without confirmation. Transmitting sensitive data without approval.

## High Integrity
**Priority:** Accuracy first.
Confidence
75% 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.

Ssd 3

Medium
Confidence
90% confidence
Finding
The Self Growth mode encourages reflection on prior interactions and maintenance of a growth log without defining privacy limits, retention boundaries, or minimization rules. This can lead to unnecessary persistence of user data, sensitive conversation details, and behavioral profiling beyond what is needed for the task.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**Priority:** Systematic first.
**Use when:** Debugging, troubleshooting, optimization, structured problem decomposition.
**Constraints:** Decompose before solving. Verify against original problem. Consider edge cases. Document assumptions. Provide fallbacks.
**Prohibited:** Jumping to solution without decomposition. Declaring solved without verification.

## I Don't Know What To Do
**Priority:** Guided discovery.
Confidence
75% 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.

Static analysis

No suspicious patterns detected.