Back to skill

Security audit

Smart Compact

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent memory-preservation purpose, but it broadly scans conversation and tool output and writes operational details to persistent memory without clear consent or enforceable secret safeguards.

Install only if you are comfortable with the agent scanning prior conversation/tool output and appending selected details to local memory files. Before use, require the agent to show the exact memory entries first, redact secrets and auth material, avoid storing internal endpoints or sensitive paths unless necessary, and periodically review or delete the memory files.

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
README.md:252
Finding

Persistent Storage of Potentially Sensitive Conversation Data Without Enforceable Safeguards

Content
View full analysis

Vulnerability Details

File Location: README.md:252-268; related operational instructions in SKILL.md:41-51 and SKILL.md:94-97
Vulnerability Type: Persistent plaintext storage of potentially sensitive information
Risk Level: Medium

Vulnerable Instruction Snippet

markdown
- **Key information**: Config values, IP addresses, API endpoints, file paths, auth tokens
- **Reference status**: Whether the info has been referenced or summarized later in conversation
- **Redundancy**: Repeated `ls`, `git status`, or similar outputs

#### Phase 2: Extract

Extracts durable information from tool outputs and conversation, categorized and written to `memory/YYYY-MM-DD.md`:

- 🔵 **New facts**: IP addresses, ports, file paths, API endpoints
- 🟡 **Decision records**: Why option A was chosen over B, with reasoning
- 🔴 **Error solutions**: Error messages and their fixes
- 🟢 **User preferences**: Explicitly stated likes or requirements
- 🟣 **Task progress**: What's done, what's in progress

Writing rules:
- **Append-only** — never overwrites existing content
- Each memory includes a brief source note

Technical Analysis

The Skill instructs the agent to inspect the entire current conversation and its tool outputs, identify configuration values, internal network information, API endpoints, file paths, authentication material, user preferences, and operational history, and then persist selected information in daily memory files.

Persistent storage is part of the declared context-preservation functionality, but the collection scope exceeds the minimum information necessary because authentication material and broad configuration data are explicitly included among extraction targets. The append-only policy further increases exposure by preventing normal replacement or correction of previously stored sensitive values.

The README separately claims that sensitive values are redacted, but the operative i ...[truncated 2658 chars]

Remediation
View remediation

Remediation Suggestions

  1. Explicitly prohibit persistence of passwords, API tokens, private keys, session cookies, authorization headers, recovery codes, and other authentication material.
  2. Replace the broad “save important configuration” policy with a minimal allowlist of information required to resume the task.
  3. Add deterministic secret detection before every write, covering common token formats, authorization headers, URLs containing credentials, private-key blocks, and high-entropy values.
  4. Redact sensitive values using non-reversible placeholders. Retain only safe metadata such as the secret type, purpose, and secure storage reference.
  5. Present the exact proposed memory entries to the user and require explicit approval before persisting them.
  6. Fail closed when a value cannot confidently be classified as non-sensitive.
  7. Create memory files with restrictive permissions and document the expected ownership and access model.
  8. Define retention and deletion controls so users can inspect, correct, expire, and securely remove stored entries.
  9. Add deduplication and update behavior rather than relying exclusively on append-only writes.
  10. Keep memory files out of source control, synchronization systems, diagnostics, and backups unless those systems provide appropriate encryption and access controls.
  11. Align SKILL.md with the README security claim by making redaction a mandatory operational rule rather than an unenforced documentation statement.
  12. Add a final post-write verification step that scans the resulting memory entry for secrets and removes the entry if validation fails.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 49)May include surrounding context.

方式三:只复制核心文件

bash
mkdir -p ~/.openclaw/skills/smart-compact
curl -o ~/.openclaw/skills/smart-compact/SKILL.md \
  https://raw.githubusercontent.com/wavmson/openclaw-skill-smart-compact/main/SKILL.md

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 50)May include surrounding context.

bash
mkdir -p ~/.openclaw/skills/smart-compact
curl -o ~/.openclaw/skills/smart-compact/SKILL.md \
  https://raw.githubusercontent.com/wavmson/openclaw-skill-smart-compact/main/SKILL.md

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 223)May include surrounding context.

bash
mkdir -p ~/.openclaw/skills/smart-compact
curl -o ~/.openclaw/skills/smart-compact/SKILL.md \
  https://raw.githubusercontent.com/wavmson/openclaw-skill-smart-compact/main/SKILL.md

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly directs the agent to persist broad categories of conversation and tool-output data into memory files, including user preferences, task progress, infrastructure details, and error records. Even with a claim of redaction, this creates a real privacy and data-minimization risk because sensitive operational context and personal data can be stored long-term in plain-language notes and later exposed to other skills, users, or logs.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The principle 'better to over-save than to miss something' encourages over-collection and retention, which conflicts with least-privilege and data-minimization practices. In a memory-writing skill, this wording materially increases the chance that sensitive or unnecessary context from tool outputs and conversations will be persisted beyond its original purpose.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

This finding concerns the skill's core behavior of writing rescued conversation details to memory files for later reuse. That is a genuine form of session persistence, and in context it becomes security-relevant because the persisted material may include operational details, user preferences, and other sensitive context that outlives the active session.

Content

Scanner excerpt · README.md (reported line 192)May include surrounding context.

md
- A bug you already solved? Agent hits the same wall again
- Made a decision for good reasons? After compaction, the reasons are gone

**Smart Compact** inserts a "pre-processing" phase before `/compact`: **rescue important information first, write it to memory files, confirm safety, then compress**.

### Core Philosophy: Rescue Before Compress

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The English section repeats the same behavior: extracting durable information from conversation and tool outputs into daily logs, including user preferences and infrastructure details. Repetition across languages strengthens that this is intended functionality, not incidental documentation, and therefore represents a genuine session-data persistence risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill allows autonomous triggering when context approaches 80% and says it should proactively suggest or run before compaction, which broadens activation beyond clear user intent. In a memory-writing skill, broad triggering increases the chance of unsolicited scanning and persistence of conversation or tool-output data, including sensitive material the user did not expect to be stored.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The principle 'save before compressing' combined with 'better to store more than miss something' encourages over-retention of conversation and tool-output content. In practice, this biases the agent toward preserving sensitive information by default, increasing privacy risk and the blast radius if memory files are later accessed by other skills, users, or systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to append extracted facts, decisions, errors, preferences, and progress into persistent memory files without any privacy notice, minimization rule, or consent check. This is dangerous because tool outputs and conversations often contain secrets, personal data, internal paths, tokens, or sensitive operational details that would become durable and easier to exfiltrate or misuse later.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The extraction phase explicitly directs the agent to pull details from tool outputs and conversation and append them to persistent memory, including addresses, configuration values, endpoints, file paths, decisions, errors, and user preferences. Because tool outputs frequently contain credentials, internal topology, proprietary code details, or personal data, this creates a durable aggregation point for sensitive information and materially increases exposure risk.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The rules explicitly classify configuration, endpoints, file paths, error-resolution details, user preferences, and task progress as information that must or should be saved. These categories can reveal internal infrastructure, behavioral profiling data, and operational context, so mandating their storage without sensitivity checks promotes over-collection and long-term retention of potentially sensitive information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

Natural-language instructions and usage guidance are almost entirely in Chinese, while the description includes both English and Chinese trigger phrases. This can effectively force a specific language for understanding or operation without explicitly offering the user a language choice or documenting the locale limitation.

Content

No source excerpt is available for this finding.