Back to skill

Security audit

Session Logs (YiHui)

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it gives broad access to historical conversation logs without clear user-confirmation, scope, or redaction guardrails.

Install only if you are comfortable letting the agent inspect prior conversation transcripts for the selected agent. Before use, ask it to search a specific session, date, or phrase, and avoid returning raw transcript text that may contain secrets or personal information.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:34
Finding

Unrestricted Search of Sensitive Historical Conversation Logs

Content
View full analysis
/sessions/` (default: `~/.openclaw/agents//sessions/`). Use the `agent=` value from the system prompt Runtime line. - **`sessions.json`** - Index mapping session keys to session IDs - **`.jsonl`** - Full conversation transcript per session ## Structure Each `.jsonl` file contains messages with: ``` ```bash ### Extract user messages from a session jq -r 'select(.message.role == "user") | .message.content[]? | select(.type == "text") | .text' .jsonl ### Search for keyword in assistant responses jq -r 'select(.message.role == "assistant") | .message.content[]? | select(.type == "text") | .text' .jsonl | rg -i "keyword" ``` ```bash ### Search across ALL sessions for a phrase AGENT_ID="" SESSION_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/agents/$AGENT_ID/sessions" rg -l "phrase" "$SESSION_DIR"/*.jsonl ``` ### Technical Analysis The skill directs the agent to locate and inspect complete historical session transcripts. These files may contain user messages, assistant responses, tool results, personal information, credentials copied into prior conversations, and context unrelated to the current request. The documented commands allow both direct extraction of message content and unrestricted searches across every session belonging to the selected agent. The skill does not require explicit user confirmation, constrain access to a particular session or date range, redact sensitive values, or prevent unrelated historical content from being returned in the active conversation. This is a least-privilege concern rather than an operating-system privilege escalat ...[truncated 1867 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to search complete historical session logs, which can contain sensitive user prompts, assistant outputs, tool results, and metadata, but it provides no privacy warning, access limitations, or minimization guidance. In an agent environment, this can lead to over-collection and disclosure of prior conversation data that the current user may not expect to be re-read or surfaced.

Content

No source excerpt is available for this finding.