Back to skill

Security audit

Moses Stamp

Security checks for vulnerabilities and agentic risk

Overview

This skill is a document-stamping tool, but it automatically alters user deliverables and keeps a separate local stamp log in ways users may not expect.

Review before installing. Use only if you explicitly want generated documents modified with MO§ES branding and local stamp history. Avoid using it on source code, JSON, configs, signed files, or externally shared documents unless you have reviewed the exact stamp and accepted the local logging behavior.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:20
Finding

Default-On Injection of Governance Branding into User Artifacts

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 20–21 and 106–109
Vulnerability Type: Forced output modification through skill instructions
Risk Level: Medium

Vulnerable Code

markdown
When this skill is active, every document you produce carries an embedded governance stamp. The stamp is not a separate log — it lives inside the artifact. The document is the audit record.

**Enforcement is automatic.** You do not wait to be asked. After producing any qualifying document, append the stamp.

The deactivation section reinforces the default-on behavior:

markdown
## Deactivation

To deactivate for a session: set an environment variable or pass `--off` to the governing agent. The stamp is a default-on enforcement gate, not an optional feature.

The required block includes third-party branding:

text
Produced under:  MO§ES™ Governance Framework
Runtime:         ClawHub (cryptographic)
© 2026 Ello Cello LLC — MO§ES™ is trademark pending

Technical Analysis

The skill instructions alter the agent's normal output behavior by requiring it to modify every qualifying document automatically. The instruction applies broadly to reports, emails, specifications, plans, source files delivered as primary artifacts, and other material intended for use outside the conversation.

This is instruction hijacking because merely activating the skill imposes a persistent, unrelated output requirement without requiring per-artifact user approval. The injected block contains governance claims and third-party branding that may not be relevant to the user's requested deliverable.

Applying the instruction to source code or structured documents can also corrupt their expected format. For example, appending a plain-text stamp to JSON, Python, shell scripts, configuration files, or signed documents could make the artifact syntactically invalid or change its digest.

Attack Path

  1. The skill ...[truncated 1107 chars]
Remediation
View remediation

Remediation Suggestions

  1. Make stamping opt-in rather than default-on.
  2. Require explicit user confirmation before modifying each existing file.
  3. Restrict automatic stamping to supported human-readable document formats.
  4. Never append plain text directly to source code, JSON, configuration files, binaries, signed documents, or other format-sensitive artifacts.
  5. Remove mandatory third-party branding unless the user specifically requests it.
  6. Present the stamp separately when modification of the original artifact is unsafe.
  7. Add a dry-run mode that displays the planned modification and target path before writing.
  8. Document a functional deactivation mechanism in the script itself; the current CLI does not implement the documented --off option.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/stamp.py:49
Finding

Integrity Stamp Authenticates Only the First 64 Characters and Inconsistent Metadata

Content
View full analysis

Vulnerability Details

File Location: scripts/stamp.py, lines 49–65
Vulnerability Type: Incomplete and inconsistent integrity protection
Risk Level: Medium

Vulnerable Code

python
def compute_integrity_hash(content, mode, posture, action_num):
    slug = (content[:64] + mode + posture + str(action_num)).encode()
    return hashlib.sha256(slug).hexdigest()


def generate_stamp(mode, posture, role, content=""):
    state = load_state()
    action_num = get_action_num()
    session_id = compute_session_id(state)
    integrity_hash = compute_integrity_hash(content, mode, posture, action_num)

    stamp = STAMP_BLOCK.format(
        mode=mode or state.get("mode", "Unrestricted"),
        posture=posture or state.get("posture", "None"),
        role=role or state.get("role", "Primary"),
        session_id=session_id,
        action_num=action_num,
        integrity_hash=integrity_hash,
    )

Technical Analysis

The integrity calculation hashes only content[:64], rather than the complete document. Consequently, all content after the first 64 Python characters is outside the authenticated scope. An attacker can modify, replace, or append arbitrary material after that prefix without changing the value produced by compute_integrity_hash, provided the governance inputs and action number remain the same during verification.

The calculation is also inconsistent with the metadata displayed in the stamp. The hash is calculated using the raw mode and posture arguments before fallback values are resolved from persistent state. When either argument is empty, the stamp can display a state-derived value while the hash was calculated using an empty string.

The displayed role and session_id fields are not included in the integrity hash at all. They can therefore be changed independently without affecting the hash. Concatenating fields without canonical framing or length prefixes also le ...[truncated 1603 chars]

Remediation
View remediation

Remediation Suggestions

  1. Hash the complete document bytes rather than content[:64].
  2. Resolve all fallback values before computing the integrity hash.
  3. Include every displayed security-relevant field, including mode, posture, role, session ID, action number, format version, and timestamp.
  4. Serialize metadata using a canonical, unambiguous representation such as canonical JSON with explicit field names.
  5. Use a domain-separated construction, for example by including a fixed protocol identifier and version.
  6. Define the exact character encoding and newline normalization rules used during generation and verification.
  7. Provide a verification command that separates the document body from its stamp, recomputes the digest, and reports mismatches.
  8. If authenticity against an active attacker is required, use an HMAC with protected key material or a digital signature rather than an unkeyed hash alone.
  9. Avoid describing the stamp as cryptographic provenance unless the verification model, key management, and authenticated data scope support that claim.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises executable commands that append data to files, but it does not declare an explicit tool scope or permission boundary. That creates a mismatch between documented behavior and enforcement, increasing the risk that an agent or runtime will perform file writes without clear user-approved constraints or policy review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs automatic embedding of governance metadata into produced documents, including session ID, action number, and integrity details, without a clear user-facing warning or consent step. This can leak operational metadata into shared artifacts and may expose internal provenance information to external recipients unintentionally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill states that governed output is enabled by default and that enforcement is automatic, which removes meaningful user choice over document modification. In context, this is more dangerous because the forced behavior changes deliverables and embeds provenance data into artifacts that may leave the conversation boundary.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module documentation and skill description imply that the produced document itself is the audit record, but the implementation also maintains a separate local audit log. That mismatch is security-relevant because users may not realize that metadata is retained outside the document, leading to unintended persistence of operational history and weakening informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script silently persists governance metadata to ~/.openclaw/governance/stamps.jsonl and derives values from prior state in ~/.openclaw/governance/state.json, which goes beyond merely generating a document stamp. This creates undisclosed local telemetry and cross-run linkage via session_id/action_num, potentially exposing document activity patterns and violating the stated expectation that stamping is confined to the document itself.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The append command writes directly to an arbitrary file path provided by the user, altering file contents in place. Although the script prints a message after completion, there is no pre-action confirmation prompt or explicit warning in the command flow that the target file will be modified.

Content

No source excerpt is available for this finding.