Back to skill

Security audit

session-recovery

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims: searches local OpenClaw session logs and can recover or restore file content, with the main risk being exposure or overwrite of sensitive local history when used intentionally.

Install only if you are comfortable letting the skill search local OpenClaw conversation logs, which may contain secrets or private file contents. Review matches before using --show-content or --restore, and be careful with --yes because it can overwrite files without an interactive prompt.

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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (9)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/extract.py (reported line 245)May include surrounding context.

python
if not yes:
        if not sys.stdin.isatty():
            print("  Non-interactive and no --yes given; aborted (refusing silent overwrite).")
            return
        prompt = "  Confirm overwrite? [y/N] " if exists else "  Confirm restore? [y/N] "
        if input(prompt).strip().lower() != "y":
            print("  Cancelled.")

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The README tells users to execute npx -y clawhub without pinning a version or integrity hash. That causes code to be fetched and executed from the registry at install time, so a compromised package, malicious update, or dependency hijack could result in arbitrary code execution on the user's machine.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The README also recommends npx -y skills ... without a pinned version. As with any unpinned npx invocation, this executes whatever package version is current at the time, increasing supply-chain risk and enabling arbitrary code execution if the package or its dependencies are compromised.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

Restore to original path (non-interactive needs --yes)

python3 scripts/extract.py 21f68359 --file-filter index.html --restore --yes

Replay edits to rebuild when no write baseline

python3 scripts/extract.py 21f68359 --file-filter app.py --rebuild
--restore-to ~/out/app.py --yes

text

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest says to trigger when the user wants to 'find lost session content' or 'search session history by keyword' and also lists short phrases like '文件被删了' and '找回某个文件'. These can overlap with common recovery/help requests outside this specific OpenClaw session-log recovery skill, and the file does not provide negative examples or explicit non-trigger conditions to narrow activation.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The skill is explicitly designed to recover persistent session content and restore files from on-disk logs, which can surface previously deleted, overwritten, or sensitive material. Even with overwrite warnings and --yes confirmation, this creates a real data persistence and recovery capability that could be misused to resurrect secrets or user-intended deletions from local conversation archives.

Content

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

Restore to a specific path

python3 scripts/extract.py 21f68359 --restore-to ~/out/index.html --yes

Pure-edit session (no write baseline): replay edits to rebuild

python3 scripts/extract.py 21f68359 --file-filter app.py --rebuild
--restore-to ~/out/app.py --yes

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/extract.py (reported line 21)May include surrounding context.

python
also reads SESSION_RECOVERY_ROOT env var)
  --agent main|all|a,b   which agent(s) to search (default: main)
  --file-filter PATH     only show ops whose path contains this substring
  --restore              restore last write / rebuild result to original path
  --restore-to PATH      restore to a specific path
  --rebuild              replay pure-edit sequence (no write baseline)
  --show-content         print full content (large files = large output)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file contains hardcoded Chinese text in user-facing output and comments, including the summary fallback "(无摘要)" and Chinese-only parsing assumptions like the GMT+8 summary extraction. This imposes a specific language/locale behavior without offering user opt-in or documenting a justified region-specific scope.

Content

No source excerpt is available for this finding.