Back to skill

Security audit

Clawsaver

Security checks for vulnerabilities and agentic risk

Overview

ClawSaver is a coherent local message-batching utility, with privacy considerations around delayed/merged messages and example logging but no evidence of hidden execution or exfiltration.

Before installing, confirm your application can tolerate short message delays and combined model prompts. Avoid using the provided example logging unchanged in production, especially for chats that may contain personal, regulated, credential, or business-sensitive content.

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

Warning
Location
example-integration.js:49
Finding
Plaintext Logging of User Messages and Session Identifiers<![CDATA[ ## Vulnerability Details **File Location**: `example-integration.js`, lines 49–70 **Vulnerability Type**: Sensitive information exposure through plaintext application logs **Risk Level**: Medium ### Vulnerable Code ```javascript async function processModelCall(sessionKey, messages, meta) { const merged = mergeMessages(messages); console.log( `\n[${sessionKey}] Processing batched input:\n` + ` Messages: ${meta.batchSize}\n` + ` Saved calls: ${meta.savedCalls}\n` + ` Message IDs: ${meta.messageIds.join(', ')}\n` ); try { // Call your model here // const result = await yourModel.complete(merged); // Placeholder for demo console.log(`[${sessionKey}] Model would receive:\n${merged}\n`); const result = `[Mock response to batch of ${meta.batchSize} messages]`; // Send response back to session await sendToSession(sessionKey, result); } catch (err) { console.error(`[${sessionKey}] Model call failed:`, err); // Add retry logic here if needed } } ``` ### Technical Analysis The exported integration example writes session keys, message identifiers, and the complete merged contents of user messages to standard output. Because this file is presented as a copy-and-adapt integration template, these logging statements may be retained when the code is deployed. User messages can contain authentication tokens, personal information, financial records, proprietary data, or other confidential material. Standard output is commonly collected by container platforms, process managers, cloud logging systems, and observability services. Consequently, information intended only for the model-processing workflow may be copied into systems with broader access, longer retention periods, or weaker controls. The logging occurs unconditionally and provides no production-mode guard, redaction, allowlist, or explicit opt-in mechanism. ### Attack Path 1. An application integrates or adapts the exported `ex ...[truncated 1378 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove logging of `merged` and all raw user-message content from the integration example. 2. Log only non-sensitive aggregate information, such as batch size, processing duration, and an internally generated non-reversible correlation value. 3. Avoid logging raw session keys and message IDs. If correlation is required, use a keyed hash or short-lived opaque identifier. 4. Make diagnostic logging explicitly opt-in and disabled by default in production. 5. Add a centralized redaction layer that removes credentials, authorization headers, tokens, email addresses, and other recognized sensitive fields before any diagnostic output. 6. Document that application logs must not contain conversation content and recommend restricted access, encryption, short retention periods, and auditing for log stores. 7. Replace the vulnerable statements with a minimal pattern such as: ```javascript if (options.debug === true) { console.log('Processing message batch', { batchSize: meta.batchSize, savedCalls: meta.savedCalls, }); } ``` 8. Add automated tests or linting rules that prevent raw message objects and merged prompts from being passed to logging functions. ]]>
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 (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Yes, this is a clear mismatch. The declared purpose describes a runtime optimization feature for buffering and batching model messages to reduce API costs. The actual code does not implement batching, message handling, or model API interactions at all. Instead, it is a publication/deployment script for releasing a package to ClawHub via npm, including test execution, authentication, publishing, and post-publish verification. That is a materially different primary purpose and introduces undeclared external registry access and publishing capabilities.

Ae1

High
Category
analysis-evasion
Content
files: ["SessionDebouncer.js", "example-integration.js"]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The guide promotes batching user messages and reporting metrics without warning that multiple user inputs may be merged, retained briefly, and potentially logged or exposed to operators differently than the original per-message flow. This can cause privacy, consent, and data-handling issues, especially where users expect immediate one-message processing or where message content may be sensitive.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The zero-config section encourages automatic handler wrapping and session logging with 'No code changes needed' but does not disclose that this silently modifies message flow and may log session-level data. Automatic interception without explicit notice increases the risk of unreviewed deployment of privacy-impacting behavior and weakens informed operator consent.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The guide explicitly merges multiple user messages and forwards them as one model input, but it does not warn integrators about the privacy and context-boundary risks of combining separate user submissions. In multi-turn or mixed-sensitivity sessions, batching can unintentionally co-transmit data a user expected to remain separate, increase prompt-injection surface across messages, and weaken consent or policy controls tied to per-message handling.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The summary promotes buffering and merging multiple user messages into one model request but does not warn that this changes how user content is processed and may have privacy implications. In multi-user, regulated, or consent-sensitive environments, silently aggregating messages can increase exposure of sensitive data, alter data minimization assumptions, and create compliance or user-expectation issues.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The manifest describes a skill whose purpose is intelligent message batching for cost reduction. This script instead logs into an external package registry, publishes the package, and verifies publication, which is release-engineering behavior rather than message batching functionality.

Missing User Warnings

Low
Confidence
88% confidence
Finding
This is a markdown file, so SQP-2 applies to user-facing descriptions that omit warnings about behaviors affecting user data or system behavior. The file highlights automatic batching and latency impact, but it frames them as features/performance notes rather than a caution that user messages may be delayed and combined before downstream handling.

Missing User Warnings

Low
Confidence
79% confidence
Finding
This code merges multiple user messages into a single prompt and passes that combined text plus session metadata to `modelFn`. Although the file documents the batching behavior for developers, it does not include any user-facing disclosure, confirmation, or warning that user input may be aggregated and forwarded together to a downstream model handler.

Static analysis

No suspicious patterns detected.