Back to skill

Security audit

Session History Share

Security checks for vulnerabilities and agentic risk

Overview

This skill openly aims to share session history, but it installs persistent automation that reads active transcripts, stores summaries, and injects them into future bootstrap context with insufficient controls.

Review carefully before installing. This skill is intended to make OpenClaw remember prior sessions, so it will retain conversation summaries on disk and automatically place them into future agent context. Avoid using it with secrets, private business data, regulated data, or multi-user environments unless you add explicit opt-in, redaction, path hardening, and reliable uninstall/retention controls.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (4)

T02 · Agent Memory Poisoning

Error
Location
hook/handler.js:57
Finding

Persistent Injection of Conversation-Derived Content into the Agent Bootstrap Prompt

Content
View full analysis
f.name === 'BOOTSTRAP.md'); if (bootstrapIndex >= 0) { const existing = bootstrapFiles[bootstrapIndex]; const existingContent = existing.content || ''; existing.content = `${existingContent}\n\n## Previous Session History\n${archive}`; } else { bootstrapFiles.push({ name: 'BOOTSTRAP.md', path: path.join(HISTORY_DIR, sessionKeyToDir(sessionKey)), content: `## Previous Session History\n${archive}`, missing: false, }); } ``` ### Technical Analysis The hook reads an archive generated from previous user and assistant messages and inserts the archive verbatim into `BOOTSTRAP.md`. Conversation-derived content is therefore promoted into an authoritative bootstrap context without validation, escaping, instruction filtering, or an explicit trust boundary. An attacker can place instruction-like content in an ordinary conversation. The scheduled summarization process may preserve those instructions in an archive, and the hook will subsequently inject them into future agent sessions. Merely adding a Markdown heading does not prevent the model from interpreting archived text as instructions. Because the content is persisted on disk and reloaded during later bootstrap events, this is a cross-session memory-poisoning issue rather than a prompt injection limited to the current interaction. ### Attack Path 1. An attacker submits malicious instructions during a normal conversation. 2. The scheduled history process reads the conversation transcript. 3. The malicious content is retained directly or indirectly in the generated summary. 4. The summar ...[truncated 747 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
hook/handler.js:12
Finding

Path Traversal Through Insufficient Session-Key Sanitization

Content
View full analysis
f.endsWith('.md')) .sort() .reverse(); if (files.length === 0) return null; const latest = path.join(dir, files[0]); const content = fs.readFileSync(latest, 'utf-8'); if (!content || content.trim().length === 0) return null; ``` ### Technical Analysis The sanitization function replaces only colon characters. It does not reject path separators, `.` or `..` components, absolute paths, or platform-specific path syntax. The resulting value is passed to `path.join(HISTORY_DIR, dirName)` and used for directory enumeration and file reading. If an attacker can control or influence the event's `sessionKey`, a traversal value such as `../../target-directory` can resolve outside the intended `.session_history` directory. The code then lists the resulting directory, selects the lexicographically latest filename ending in `.md`, and reads its contents. The selected file is subsequently injected into `BOOTSTRAP.md`, which compounds the local file disclosure with a prompt-injection risk if the external Markdown file contains instructions. ### Attack Path 1. An attacker causes the hook to receive a `sessionKey` containing traversal components, such as `../../target-directory`. 2. `sessionKeyToDir()` leaves the traversal components unchanged. 3. `path.join()` resolves the value ...[truncated 831 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/install.sh:69
Finding

Overbroad Collection and Persistent Storage of Active-Session Conversations

Content
View full analysis
/-.md\n - safeSessionKey 是把 sessionKey 中的冒号替换为下划线\n f. 生成的摘要在**不丢失关键内容**的情况下尽可能的**简短**\n1. **文件内容只包含摘要正文纯文本,不要写任何 metadata header(不要 Session Key、Date、分隔线、标题等)**\n2. 每个 sessionKey 只保留最近 3 个存档文件,删除旧的\n3. 完成后回复 NO_REPLY"`, { stdio: 'inherit' }); ``` ### Technical Analysis The installed scheduled task is instructed to enumerate all active sessions, access each session's transcript path, and process either a compaction summary or up to 200 recent user and assistant messages. The derived content is then written to persistent storage. The implementation does not demonstrate per-session consent, sensitivity classification, secret filtering, encryption, explicit owner-only permissions, or authorization checks establishing that the scheduled isolated session should access every ordinary session. Retaining three archive files limits duration but does not address the underlying broad access and storage exposure. Although this behavior is described as a feature, it crosses session isolation boundaries and increases the lifetime and number of copies of potentially sensitive conversation data. ### Attack Path 1. A user installs the skill, causing the schedu ...[truncated 1067 chars]
Remediation
View remediation

T06 · System Persistence

Warning
Location
scripts/install.sh:25
Finding

Installation of Persistent Bootstrap Hook and Recurring Scheduled Task

Content
View full analysis
/-.md\n - safeSessionKey 是把 sessionKey 中的冒号替换为下划线\n f. 生成的摘要在**不丢失关键内容**的情况下尽可能的**简短**\n1. **文件内容只包含摘要正文纯文本,不要写任何 metadata header(不要 Session Key、Date、 ...[truncated 1992 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill’s core purpose is cross-session sharing of conversation history with automatic injection of recalled summaries into prompts, which is effectively a built-in mechanism for retaining and disclosing prior session content. In this context, the behavior is especially risky because prompt/bootstrap injection can surface sensitive historical information to future sessions without contemporaneous user awareness or consent.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The cron instructions direct the agent to read active session transcript files, extract content, and carry that content forward into new sessions via summaries and prompt/bootstrap injection. This creates a direct natural-language data flow across session boundaries, which can disclose secrets, personal data, or prior-user context in sessions where that information was not intended to appear.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill automatically reads prior session history from .session_history/<safeSessionKey>/ and injects it into bootstrapFiles without any user-facing warning or consent signal. This can silently expose sensitive data from previous sessions to subsequent agent runs, increasing the risk of privacy leakage, unintended data sharing, and prompt-scope escalation through inherited context.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Automatically appending raw prior-session transcript content into BOOTSTRAP.md creates a direct natural-language data-flow from historical conversations into subsequent interactions. In a skill context, bootstrap content is highly privileged, so archived prompts, secrets, or adversarial instructions can influence future model behavior and leak user data across runs.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The cron payload explicitly instructs the agent to read transcript JSONL files, derive summaries of user/assistant exchanges, and write them into persistent per-session archive files. This creates a durable secondary store of conversation content, expanding the attack surface and increasing exposure of sensitive information beyond the original transcripts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly describes automatic extraction, summarization, persistence, and reinjection of prior session content across sessions, but it does not mention consent, visibility, retention safeguards, or handling of sensitive data. This creates a real privacy and data-governance risk because users may unknowingly have confidential prompts, credentials, personal data, or internal business context copied into future sessions and stored on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states that it shares conversation history across sessions and injects recalled summaries into new sessions, but it does not present a clear, front-loaded warning about persistence and cross-session disclosure. This is dangerous because users may reasonably assume session isolation, while sensitive content from one session can silently reappear in another session context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The cron configuration instructs automatic creation of summary files and deletion of older archives, but it does not clearly warn users that conversation-derived data will be written to disk and retained according to a rotation policy. This is dangerous because users may be unaware of both the persistence of potentially sensitive summaries and the automatic deletion behavior, which can affect privacy, compliance, and audit expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown/manifest header states the skill will "Inject previous session history into bootstrap" on the "agent:bootstrap" event, but it does not provide any limiting conditions, exclusions, or scope constraints for when history sharing should or should not occur. Because the activation is automatic and broadly tied to bootstrap, the trigger behavior is underspecified and could lead to unintended invocation in contexts where prior session history should not be injected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The operational description is written entirely in Chinese with no indication that language is optional, selectable, or justified by a region-specific purpose. This can represent a language/locale policy issue when a skill implicitly assumes a single language without user opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The hook automatically reads archived session transcripts from a per-session history directory and injects that content into the current bootstrap context without any visible consent, authorization check, or data-minimization control. This creates cross-session exposure of prior user data to future model runs, which can disclose sensitive information and expand prompt-injection risk because historical content is treated as trusted bootstrap material.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script modifies user configuration and installs a persistent scheduled task without any prompt, consent flow, or granular choice. In a skill context, silently enabling background processing of conversation history increases privacy risk and can surprise users with durable monitoring behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The installer silently creates a scheduled task that enumerates all active sessions, reads their transcript files, and persists summaries. That is a broad data-collection capability unrelated to minimal hook installation and creates ongoing surveillance of potentially sensitive user and assistant conversations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language interface is entirely in Chinese, including the script description and operational messages, with no indication that the skill is Chinese-only or that users can opt into another language. This can violate language/locale policy when a skill imposes a specific language by default.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The inline comment at L45 states that logging occurs only on error, which is true within the catch block but contradicted by the success-path log call at L62. This creates misleading documentation about when session-related activity is recorded.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The header comment mentions creating a cron job but omits the security-relevant behavior: continuous inspection of all active session transcripts and archival of summaries to disk. This lack of transparency undermines informed consent and makes the installer behavior deceptively broader than advertised.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The scheduled task is configured with a fixed timezone of Asia/Shanghai, which imposes a locale-specific behavior regardless of the user's environment. This is a natural-language policy concern because the skill does not offer opt-in or explain why a region-specific timezone is required.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/install.sh:74

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/uninstall.sh:65