Back to skill

Security audit

ClawVault

Security checks for vulnerabilities and agentic risk

Overview

This memory skill is mostly coherent, but enabling its hook gives it automatic access to prior sessions and vault memories in ways users should review carefully first.

Review and pin the CLI dependencies before installing, and only enable the hook if you are comfortable with it automatically reading OpenClaw session data, injecting recovered memories into agent context, clearing recovery state on startup, and possibly using an external LLM for observe compression when configured. Avoid storing secrets in transcripts or vault memories unless you have disabled or constrained observation and remote compression.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

other

Error
Location
hooks/clawvault/handler.js:531
Finding

Automatic Transcript Observation Can Transmit Sensitive Session Content to an External LLM

Content
View full analysis
0) { args.push('--min-new', String(Math.floor(Number(options.minNewBytes)))); } const result = runClawvault(args, { timeoutMs: 120000 }); if (!result.success) { console.warn(`[clawvault] Observer cron failed (${options.reason || 'unknown reason'})`); return false; } if (result.output) { console.log(`[clawvault] Observer cron: ${result.output}`); } else { console.log('[clawvault] Observer cron: complete'); } return true; } ``` ```js const agentId = resolveAgentIdForEvent(event); runObserverCron(vaultPath, agentId, { minNewBytes: 1, reason: 'command:new flush' }); ``` ```js async function handleHeartbeat(event) { const vaultPath = findVaultPath(); if (!vaultPath) { console.log('[clawvault] No vault found, skipping heartbeat observation check'); return; } const agentId = resolveAgentIdForEvent(event); if (!shouldObserveActiveSessions(vaultPath, agentId)) { console.log('[clawvault] Heartbeat: no sessions crossed active-observe threshold'); return; } runObserverCron(vaultPath, agentId, { reason: 'heartbeat threshold crossed' }); } async function handleContextCompaction(event) { const vaultPath = findVaultPath(); if (!vaultPath) { console.log('[clawvault] No vault found, skipping compaction observation'); return; } const agentId = resolveAgentIdForEvent(event); runObserverCron(vaultPath, agentId, { minNewBytes: 1, reason: 'context compaction' }); } ``` The associated documentation states: ```markdown - `observe - ...[truncated 2466 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
hooks/clawvault/handler.js:316
Finding

Retrieved Transcript and Memory Content Is Injected with System-Message Authority

Content
View full analysis
({ title: sanitizeForDisplay(entry?.title || 'Untitled'), age: sanitizeForDisplay(entry?.age || 'unknown age'), snippet: truncateSnippet(entry?.snippet || '') })) .filter((entry) => entry.snippet); } catch { return []; } } function parseSessionRecapJson(output) { try { const parsed = JSON.parse(output); if (!parsed || !Array.isArray(parsed.messages)) return []; return parsed.messages .map((entry) => { if (!entry || typeof entry !== 'object') return null; const role = typeof entry.role === 'string' ? entry.role.toLowerCase() : ''; if (role !== 'user' && role !== 'assistant') return null; const text = truncateRecapSnippet(typeof entry.text === 'string' ? entry.text : ''); if (!text) return null; return { role: role === 'user' ? 'User' : 'Assistant', text }; }) .filter(Boolean) .slice(-MAX_RECAP_RESULTS); } catch { return []; } } function formatSessionContextInjection(recapEntries, memoryEntries) { const lines = ['[ClawVault] Session context restored:', '', 'Recent conversation:']; if (recapEntries.length === 0) { lines.push('- No recent user/assistant turns found for this session.'); } else { for (const entry of recapEntries) { lines.push(`- ${entry.role}: ${entry.text}`); } } lines.push('', 'Relevant memories:'); if (memoryEntries.length === 0) { lines.push('- No relevant vault memories found for the current prompt.'); ...[truncated 3274 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:64
Finding

Installation Instructions Use Mutable and Unpinned Global Dependencies

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Provides an OpenClaw **hook pack** (`hooks/clawvault/handler.js`) with lifecycle events (`gateway:startup`, `gateway:heartbeat`, `command:new`, `session:start

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Provides an OpenClaw **hook pack** (`hooks/clawvault/handler.js`) with lifecycle events (`gateway:startup`, `gateway:heartbeat`, `command:new`, `session:start

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Provides an OpenClaw **hook pack** (`hooks/clawvault/handler.js`) with lifecycle events (`gateway:startup`, `gateway:heartbeat`, `command:new`, `session:start

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Auditability:** the published ClawHub skill bundle includes `SKILL.md`, `HOOK.md`, and `hooks/clawvault/handler.js` so users can inspect hook behavior before

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation describes automatic context injection into session messages and the first agent turn, but it does not clearly warn users that potentially sensitive recovered vault content may be inserted automatically. In a hook that runs on startup and session start, this can cause unintended disclosure of prior-session or vault data to prompts, logs, downstream models, or other participants without explicit user awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The startup behavior states that it runs clawvault recover --clear, but the documentation does not explicitly warn that this operation clears recovery state. Users may enable the hook without understanding that startup performs a state-mutating command, which can affect forensic visibility, recovery workflows, or expected persistence semantics.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The header comment describes the hook as providing automatic context-death resilience through startup, heartbeat, new-command, compaction, and session-start behaviors. However, the implementation also routes cron weekly events to handleWeeklyReflect and runs clawvault reflect, which is not mentioned in the documented capabilities and is semantically distinct from recovery/resilience.

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
hooks/clawvault/handler.js:11