Back to skill

Security audit

session-continuity

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate checkpointing purpose, but it can silently persist session context and its CLI can read, overwrite, or delete Markdown files outside the checkpoint folder through unvalidated names.

Install only if you are comfortable with local checkpoint files that may retain sensitive project context across sessions. Treat this as needing review before use: restrict checkpoint names, avoid saving secrets or personal data, review and purge autosave files, and fix the path validation issue before enabling delete or resume commands in a sensitive workspace.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/checkpoint.py:32
Finding

Path Traversal Through Unvalidated Checkpoint Names

Content
View full analysis

Vulnerability Details

File Location: scripts/checkpoint.py:32-33, 40, 114-120, 135-141, 195-207
Vulnerability Type: Path traversal enabling unauthorized Markdown file access
Risk Level: High

Vulnerable Code

python
def checkpoint_exists(name: str) -> bool:
    return (CHECKPOINT_DIR / f"{name}.md").exists()
python
def save_checkpoint(name: str, task: str = "") -> None:
    """Save a named checkpoint from current SESSION-STATE.md and recent context."""
    CHECKPOINT_DIR.mkdir(parents=True, exist_ok=True)
    out_file = CHECKPOINT_DIR / f"{name}.md"

    session_state = get_session_state()
    now = datetime.now().strftime("%Y-%m-%d %H:%M GMT+8")

    content = f"""# Checkpoint: {name}

**Created:** {now}
**Task:** {task or "Unnamed task"}

## Progress
<!-- Describe what was completed in this session -->

## Next Action
<!-- Exact next step: which file, which command -->

## Blockers
<!-- Concrete obstacles: errors, conflicts, pending decisions -->

## Key Decisions
<!-- Reasoning that led to current state -->

## Relevant Context
<!-- Files, paths, preferences needed to continue -->
"""

    out_file.write_text(content)
python
def resume_checkpoint(name: str) -> None:
    """Print checkpoint content for review before resumption."""
    cp_file = CHECKPOINT_DIR / f"{name}.md"
    if not cp_file.exists():
        print(f"ERROR: No checkpoint named '{name}'")
        sys.exit(1)

    content = cp_file.read_text()
python
def delete_checkpoint(name: str) -> None:
    """Delete a named checkpoint."""
    if name == "autosave":
        print("ERROR: Cannot delete autosave. Use a named checkpoint.")
        sys.exit(1)

    cp_file = CHECKPOINT_DIR / f"{name}.md"
    if not cp_file.exists():
        print(f"ERROR: No checkpoint named '{name}'")
        sys.exit(1)

    cp_file.unlink()
python
    elif cmd == "save":
        name = sys.argv[2]
        task = ""
        if len(sys.argv) > 4 and sys.argv[3] == "--ta
...[truncated 3493 chars]
Remediation
View remediation

Remediation Suggestions

  1. Enforce the documented checkpoint-name grammar before any filesystem operation. For example:
python
import re

NAME_PATTERN = re.compile(r"^[a-z0-9]+(?:-[a-z0-9]+)*$")
FORBIDDEN_NAMES = {"task", "work", "save", "untitled", "backup"}

def validate_name(name: str) -> str:
    if not NAME_PATTERN.fullmatch(name):
        raise ValueError(
            "Checkpoint names must contain lowercase letters, digits, and "
            "single hyphens only."
        )
    if name in FORBIDDEN_NAMES:
        raise ValueError("Reserved checkpoint name.")
    return name
  1. Centralize secure path construction and verify containment after resolution:
python
def checkpoint_path(name: str) -> Path:
    name = validate_name(name)
    base = CHECKPOINT_DIR.resolve()
    candidate = (base / f"{name}.md").resolve()

    if candidate.parent != base:
        raise ValueError("Checkpoint path escapes the checkpoint directory.")

    return candidate
  1. Use this helper in checkpoint_exists, save_checkpoint, resume_checkpoint, and delete_checkpoint.

  2. Reject path separators, absolute paths, empty names, . and .. components, control characters, and reserved filenames before performing any read or write.

  3. Avoid silently overwriting an existing named checkpoint. Require an explicit overwrite option, user confirmation, or atomic exclusive creation where appropriate.

  4. Consider symlink defenses if the checkpoint directory may be writable by untrusted local users. Validate that the destination is not a symlink and use operating-system facilities that prevent symlink following where available.

  5. Add regression tests covering all affected commands, including:

text
../target
../../target
/absolute/target
name/with/slash
.
..
autosave
valid-kebab-name

The tests should assert that invalid names cannot read, create, overwrite, probe, or delete files outside CHECKPOINT_DIR.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill description promises bounded checkpoint save/resume behavior, but the body also authorizes delete/list operations, silent autosave logging, and persistence of broader state than the description suggests. Security-relevant behavior that is omitted or inaccurately described undermines informed consent and can lead operators to enable a skill with more authority and retention than intended.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

The documented installation and behavior establish durable storage under ~/.openclaw/workspace/memory/checkpoints, enabling session data to persist beyond the active conversation. Persistence is core to the skill’s function, but in this context it creates a real security/privacy risk because stored checkpoints may include sensitive operational context, and the README does not mention access controls, encryption, retention limits, or secret-handling safeguards.

Content

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

Copy the skill to your OpenClaw workspace skills directory

cp -r session-continuity ~/.openclaw/workspace/skills/

Create the checkpoints directory

mkdir -p ~/.openclaw/workspace/memory/checkpoints

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README documents automatic checkpointing of session state, including task summaries, decisions, blockers, file paths, and next actions, but does not prominently warn that this content may contain sensitive user or workspace data and will persist across sessions. In a session-resume skill, silent or poorly disclosed persistence increases the chance of retaining secrets, proprietary code context, or personal data longer than users expect.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

This duplicate finding reflects the same persistence behavior: the installation step creates a durable local storage location for checkpoints, enabling conversation and task data to survive session death. In the context of a resume/checkpoint skill, that behavior is functional rather than malicious, but it still presents a genuine privacy and data-retention risk if users are not clearly warned.

Content

Scanner excerpt · README_zh.md (reported line 33)May include surrounding context.

cp -r session-continuity ~/.openclaw/workspace/skills/

创建断点目录

mkdir -p ~/.openclaw/workspace/memory/checkpoints

text

**验证安装:**

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

This duplicate finding reflects the same persistence behavior: the installation step creates a durable local storage location for checkpoints, enabling conversation and task data to survive session death. In the context of a resume/checkpoint skill, that behavior is functional rather than malicious, but it still presents a genuine privacy and data-retention risk if users are not clearly warned.

Content

Scanner excerpt · README_zh.md (reported line 33)May include surrounding context.

cp -r session-continuity ~/.openclaw/workspace/skills/

创建断点目录

mkdir -p ~/.openclaw/workspace/memory/checkpoints

text

**验证安装:**

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README states that checkpoints store detailed task state, file paths, line numbers, blockers, and key decisions, but it does not warn that this data may include sensitive project information, credentials, internal paths, or reasoning traces written to disk. Persisting rich session context without an explicit privacy/data-sensitivity warning increases the risk of unintended local disclosure, especially on shared machines, synced home directories, backups, or when users assume chat state is ephemeral.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README documents automatic autosave triggers that write task context to autosave.md based on close signals, high context usage, inactivity, or long-running operations, but it does not clearly warn that disk writes can happen without an explicit save command. This can surprise users and cause sensitive conversational or project context to be persisted unexpectedly, which is more dangerous in a session-continuity skill because silent persistence is its core behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill clearly instructs file reads and writes and implies environment/context inspection, but it declares no explicit tool scope or permissions. That creates a least-privilege failure: a host may grant broader capabilities than users expect, and reviewers cannot accurately assess what the skill is allowed to touch.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill claims it should activate automatically on broad conditions like close signals and high context, but those conditions are underspecified and easy to trigger unintentionally. Over-broad autonomous activation can cause unexpected persistence or file writes without a deliberate user request.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Resume triggers include common phrases such as 'continue where we left off' and 'where did we stop?', which can appear in ordinary conversation without intent to read durable state from disk. This raises the chance of unplanned checkpoint access and unintended disclosure of previously saved task context.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The checkpoint instructions tell the agent to persist conversation-derived context, key decisions, and user preferences across sessions. That can capture sensitive or personal data beyond what is necessary for task resumption, increasing privacy, compliance, and cross-session data exposure risks.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill says user approval is required before proceeding, but then instructs the agent to delete the checkpoint automatically when the user rejects resumption. A refusal to resume is not consent to destroy stored state, so this creates a data-loss and integrity risk through ambiguous control flow.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The auto-checkpoint protocol mandates silent background retention of session state and logging every triggered save, which creates an undisclosed audit trail of user activity. Because it operates automatically and invisibly, it heightens privacy risk and can accumulate sensitive historical context far beyond immediate task needs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The internal auto-checkpoint triggers are broad and include heuristics like idle time, long operations, and token usage thresholds, all of which can fire without meaningful user awareness. In a persistence-focused skill, that materially increases the likelihood of covert or excessive data retention.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly directs silent writes to autosave.md and append-only logging with 'No user-visible output.' Hidden persistence is dangerous because it stores session-derived information without transparency, preventing users from understanding, approving, or limiting what is retained.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file explicitly instructs the agent to scan autonomously for triggers and write checkpoint files without a clear user-facing consent or warning mechanism. In a skill that persists task state across sessions, silent file writes can capture sensitive context and modify persistent state in ways the user did not expect, increasing privacy and integrity risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document explains that autosave only ever writes to autosave.md, which implies repeated modification of the same file. Although it notes named checkpoints are not overwritten, it does not clearly warn users that the rolling autosave file itself may be replaced automatically.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown template includes natural-language guidance/examples that specify 'Chinese UI labels' and later a report 'should be in Chinese' / 'preference Chinese output' within a generic checkpoint format. Because this file is presented as a reusable template rather than a clearly region-specific tool, the language preference is being embedded without an explicit opt-in flow, which can violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The checkpoint template explicitly includes personal identifiers and contact details such as a username and email address in a persistence mechanism intended for session continuity. Because checkpoints survive session death and may stack across days, this encourages unnecessary retention of personally identifiable information unrelated to the minimum state needed to resume work, increasing privacy and data exposure risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/checkpoint-format.md (reported line 107)May include surrounding context.

md
Update `upload` function in `src/utils/api-client.ts` lines 150-200:
- Add retry wrapper with 3 max attempts
- Add 30s timeout
- Test with `curl -X POST http://localhost:3001/api/upload -d "test"`

## Blockers
- Need test file >5MB — currently don't have one

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

Scanner excerpt · references/checkpoint-format.md (reported line 141)May include surrounding context.

Not sure

text

**Why it's bad:** No specific file, no specific command, no way to resume without asking questions.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The stale checkpoint protocol says to delete a stale checkpoint when the user chooses to start fresh, but it does not explicitly warn about irreversible data loss or require a separate confirmation before deletion. In a session-continuity skill, checkpoints are the persistence mechanism for task state, so accidental deletion can destroy the only recoverable record of unfinished work.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes saving the current task state, progress, blockers, and next action so work can resume from the exact point. The save_checkpoint function even documents that it saves from SESSION-STATE.md and recent context, and it reads session_state at L042, but that data is never incorporated into the written checkpoint content at L045-L064.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstring at L038 says the function saves a named checkpoint from current SESSION-STATE.md and recent context. In reality, although session_state is read at L042, the output written at L066 contains only boilerplate sections and does not include session_state or any recent context extraction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code permanently deletes a checkpoint file via unlink() and only prints a success message after the deletion has already happened. For a destructive operation, there is no confirmation prompt or pre-action disclosure in the code path before the file is removed.

Content

No source excerpt is available for this finding.