Back to skill

Security audit

Self Reflection

Security checks for vulnerabilities and agentic risk

Overview

The skill’s reflection behavior is coherent, but its install instructions pull and periodically run an unreviewed remote executable.

Review the GitHub repository and pin a trusted commit before installing, because the package submitted here does not contain the executable it tells you to run. Keep the reflection memory file out of shared or synced workspaces, avoid logging secrets or private user data, and periodically delete or review stored lessons.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • 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)

T03 · Remote Payload Retrieval and Execution

Warning
Location
README.md:96
Finding

Mutable Remote Executable Installed into the User PATH

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 96-103
Vulnerability Type: Mutable remote payload retrieval and execution
Risk Level: Medium

bash
# Clone the skill
git clone https://github.com/hopyky/self-reflection.git ~/.openclaw/skills/self-reflection

# Add to PATH
ln -sf ~/.openclaw/skills/self-reflection/bin/self-reflection ~/bin/self-reflection

# Create config
cp ~/.openclaw/skills/self-reflection/self-reflection.example.json ~/.openclaw/self-reflection.json

Technical Analysis

The documented installation procedure clones the mutable default branch of a remote Git repository without pinning a reviewed commit, verifying a cryptographic checksum, or validating a release signature. It then symlinks the remotely obtained bin/self-reflection executable into the user's ~/bin directory.

Consequently, the code users install may differ from the code that was reviewed. The executable referenced by these instructions is also absent from the submitted artifact, preventing verification of its behavior. The exposure is amplified by the documented heartbeat integration, which instructs the agent to invoke self-reflection check periodically.

No evidence establishes that the current upstream repository is malicious. The vulnerability is the mutable and unverified remote-code installation mechanism.

Attack Path

  1. An attacker compromises the upstream repository, its maintainer account, or another mechanism capable of modifying its default branch.
  2. The attacker adds malicious commands to bin/self-reflection.
  3. A user follows the README and clones the mutable default branch without integrity verification.
  4. The installation procedure symlinks the downloaded executable into ~/bin.
  5. The user or configured OpenClaw heartbeat invokes self-reflection check.
  6. The malicious commands execute with the privileges of the affected user.

Impact Assessment

Successful expl ...[truncated 475 chars]

Remediation
View remediation

Remediation Suggestions

  • Distribute the executable inside the reviewed skill artifact so the installed implementation matches the audited content.
  • Pin installation to an immutable, reviewed Git commit or versioned release rather than the repository's default branch.
  • Publish and verify a SHA-256 or stronger digest before installation.
  • Sign releases and require signature verification against a documented maintainer key.
  • Avoid symlinking unverified remote content directly into a PATH directory.
  • Ensure automated heartbeat execution begins only after package integrity and executable contents have been validated.
  • Add the missing executable implementation to future audit submissions so its command parsing, file operations, and trust boundaries can be reviewed.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill encourages logging mistakes and lessons learned, but the nearby description does not prominently warn that those reflections are persisted to local files. This can lead agents or users to record sensitive prompts, credentials, internal errors, or private workflow details into long-lived storage, increasing the chance of later disclosure.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

The installation and integration guidance establishes persistent local configuration for a mechanism that regularly stores reflection data across sessions. Persistence itself is intentional, but it creates a durable record of agent behavior and mistakes that may outlive the original context and expose sensitive information if the host is shared, backed up, or later accessed by other tools.

Content

Scanner excerpt · README.md (reported line 85)May include surrounding context.

Add to PATH

ln -sf ~/.openclaw/skills/self-reflection/bin/self-reflection ~/bin/self-reflection

Create config

cp ~/.openclaw/skills/self-reflection/self-reflection.example.json ~/.openclaw/self-reflection.json

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The configuration explicitly defines persistent memory and state files, which confirms that the skill keeps session-derived data across runs. If reflections include secrets, incident details, or internal prompts, this local accumulation can become a sensitive data store that is easy to overlook and may be exfiltrated or inadvertently committed to repositories.

Content

Scanner excerpt · README.md (reported line 200)May include surrounding context.

Configuration

Create ~/.openclaw/self-reflection.json:

json
{

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

The skill explicitly instructs persistent storage of self-reflection data and state in user-accessible files under the home/workspace directories. Because reflections may contain mistakes, operational context, or sensitive internal details, this creates a real data-retention and session-persistence risk if the files are over-collected, insufficiently protected, or later exposed to other tools, users, or prompts.

Content

Scanner excerpt · SKILL.md (reported line 82)May include surrounding context.

Configuration

Create ~/.openclaw/self-reflection.json:

json
{

Vague Triggers

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The README instructs agents to run self-reflection check at each heartbeat, but does not provide negative examples or constraints beyond the periodic schedule. For a markdown skill description, this leaves the activation scope somewhat open-ended and could cause the skill to be invoked mechanically in contexts where reflection may not be appropriate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description states that it tracks mistakes, lessons learned, and improvements over time, which implies persistent storage of potentially sensitive work details. The README later specifies file locations for this memory, but there is no user-facing warning about local data retention or privacy implications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

Reset operations can alter or clear state in ways that affect the skill's behavior, but the command table only says 'Reset the timer' without clarifying consequences. For markdown guidance, user-affecting state changes should be disclosed when they may impact stored data or system behavior.

Content

No source excerpt is available for this finding.