Back to skill

Security audit

Session Digest

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local conversation-digest tool, but it reads all agents' session histories and writes raw extracted conversations to a predictable shared temporary file.

Review carefully before installing. This skill can read conversation history from every local OpenClaw agent for a selected date and leaves the extracted raw text in /tmp. Install only if that broad access is intended; a safer version should let you choose agents, redact sensitive content, write to a private 0600 file under the user's OpenClaw directory, and clean up temporary data.

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 (2)

other

Warning
Location
scripts/extract.js:19
Finding

Unrestricted Collection of Conversation History Across All Agents

Content
View full analysis
{ return fs.statSync(path.join(AGENTS_DIR, f)).isDirectory(); }); for (const agent of agents) { const sessionsDir = path.join(AGENTS_DIR, agent, 'sessions'); if (!fs.existsSync(sessionsDir)) continue; const jsonlFiles = fs.readdirSync(sessionsDir).filter(f => f.endsWith('.jsonl')); for (const file of jsonlFiles) { if (file.includes(':run:')) continue; files.push(path.join(sessionsDir, file)); } } return files; } ``` ### Technical Analysis The extractor enumerates every directory under `~/.openclaw/agents` and collects every session file ending in `.jsonl`. It does not restrict collection to the current agent, an explicitly selected agent, or an allowlisted set of sessions. This behavior is disclosed in `SKILL.md`, so it is not covert. However, it violates data-minimization and least-access principles because performing a digest for one context can expose conversations belonging to unrelated agents. There is no consent check, sensitivity filter, credential redaction, or per-agent access control in the extraction logic. The resulting aggregation is especially sensitive because data distributed across multiple session files is consolidated into one artifact and subsequently intended to be read by a summarizing agent. Historical messages may contain credentials, private user information, internal paths, operational instructions, or other confidential material. ### Attack Path 1. An attacker or untrusted automation obtains the ability to invoke the skill under a user account that can read the OpenClaw agent directory. 2. The attacker executes `extract.js` for a date on which sensi ...[truncated 1055 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/extract.js:114
Finding

Predictable Shared Temporary File Exposes Extracted Conversations

Content
View full analysis
Remediation
View remediation
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 (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared behavior says the skill summarizes conversations into memory files, but the described implementation instead extracts raw messages from all agents, writes them to /tmp, and omits the claimed scheduling behavior. This mismatch is dangerous because users may authorize a benign-looking summarization skill while it actually aggregates sensitive cross-agent transcripts into a less protected temporary location.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 运行 `extract.js` 提取当天对话到临时文件

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. 运行 `extract.js` 提取当天对话到临时文件

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` - 本文件

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
78% confidence
Finding

The skill declares no explicit tool scope or permissions while describing behavior that reads local session data across agents and invokes a script. Even though this file is documentation, the absence of scoped permissions makes the data access boundary unclear and can allow broader-than-expected access to sensitive local conversation history.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description and the entire usage/output specification are written to require Chinese summaries and section headings such as '做成了什么' and '学到了什么'. This imposes a specific language/locale on the skill output without documenting user choice, opt-in, or a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The inline documentation explicitly states '只负责提取对话,总结交给 agent' ('only responsible for extracting conversations; summarization is handed to the agent'). That directly conflicts with the manifest description that presents this skill as automatically summarizing the day's dialogue into a memory file.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script enumerates every agent directory under ~/.openclaw/agents and aggregates all session JSONL files, which exceeds the stated scope of summarizing a single agent's daily dialogue. This creates unnecessary cross-agent data collection and can mix unrelated or more sensitive conversations into one export, violating least-privilege expectations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script writes extracted conversation transcripts to a predictable file in /tmp, which broadens exposure of sensitive session content beyond the declared memory destination. On multi-user systems or environments where /tmp is monitored, backed up, or accessed by other processes, this can leak private prompts, secrets, or internal data from conversations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Exporting full session data to a local temporary file without clear disclosure or consent is a real privacy/security issue, especially because the data consists of conversations that may contain secrets, credentials, or sensitive user content. The risk is amplified by the use of a shared temporary location and by the skill description not warning that raw transcripts will be exported there.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file contains natural-language instructions and output text in Chinese, including the comment stating summarization is handled elsewhere and the formatted role labels/messages shown to users. This imposes a specific language/locale without offering choice or documenting a justified locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script prints status messages and conversation role labels in Chinese, such as '没有对话记录', '对话已提取到', '用户', and '助手'. This is a language policy concern because the skill does not provide user choice or explicit opt-in for the forced locale.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.