Back to skill

Security audit

Token Efficient Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a token-saving guide, but it also tells agents to proactively read memories, documents, calendars, and learned behavior patterns without clear user opt-in or task boundaries.

Install only if you are comfortable with an agent using token-efficiency techniques that may proactively access personal memories, documents, calendar context, and behavior patterns. Prefer disabling or rewriting the predictive preloading and heartbeat-learning parts unless you have explicit controls for opt-in, source limits, visibility, and short-lived task-scoped caching.

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:150
Finding

Autonomous Preloading of Sensitive Personal Context Violates Least Privilege

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:150-168
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Medium

Complete Vulnerable Instruction Snippet:

markdown
### Technique 5: Predictive Context Preloading (Anticipatory Caching)

Instead of: Reactive loading after each user query
Use: Predictive loading based on conversation patterns and time/context cues

**Implementation:**
- During lulls in conversation (or during heartbeat cycles), predict likely next queries
- Preload relevant memory snippets or document summaries
- Store in session context for instant access

**Prediction Signals:**
- Time of day (regular meeting times)
- Recent topics (if discussing X, likely to discuss Y next)
- External triggers (calendar events, time-based patterns)
- User behavior patterns (learned over time)

**Example**: If user always asks about project status at 10 AM, preload project-related memory snippets at 9:45 AM.

**Efficiency Gain**: Converts high-cost reactive operations to near-zero-cost proactive operations.

Technical Analysis

The Skill instructs the Agent to access memory snippets or document summaries proactively during idle periods or heartbeat cycles. Access is initiated from behavioral predictions, time signals, and previous conversation patterns rather than a current user request.

Although the Skill does not grant itself new operating-system permissions, it directs the Agent to use already-authorized memory and document tools beyond the immediate task boundary. This violates least-privilege and purpose-limitation principles: token optimization does not require speculative access to personal memories or documents before the user asks for that information.

Storing proactively retrieved information in session context increases its exposure. Sensitive project information, calendar-derived context, personal behavior patterns, or document contents co ...[truncated 1938 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove predictive preloading during idle periods and heartbeat cycles.
  2. Require an active, user-initiated request before searching memories, calendars, or connected documents.
  3. Require explicit confirmation before accessing especially sensitive sources or performing retrieval unrelated to the current request.
  4. Enforce task-scoped retrieval controls so queries are restricted to sources, time ranges, fields, and documents necessary for the active task.
  5. Keep retrieved information ephemeral and remove it from session context once the task is complete.
  6. Do not derive speculative access decisions from learned user behavior without explicit opt-in and a documented retention policy.
  7. Add audit logging for background memory and document access, including the triggering request, data source, purpose, and retention period.
  8. If caching is retained, cache only non-sensitive metadata or user-approved summaries, isolate caches by task, apply short expiration periods, and prohibit reuse in unrelated conversations.
  9. Treat all retrieved document content as untrusted data and prevent embedded instructions from controlling tools or requesting disclosure of other context.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly recommends predictive preloading based on user behavior, time cues, and external triggers, which encourages anticipatory access to memories and documents before a user asks for them. In a personal-agent environment like OpenClaw, this expands data access beyond the immediate task and can normalize surveillance-like behavior without clear consent, purpose limitation, or privacy safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advises predictive preloading and learned behavior patterns to access likely relevant memory snippets or document summaries, but does not pair this with any user warning, consent model, or privacy boundary. That creates a clear risk of proactive retrieval of sensitive information that the user did not request in the current interaction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The heartbeat optimization section instructs autonomous background behavior for memory consolidation, predictive loading, context cleanup, and learning user patterns. This goes beyond token-efficiency advice into ongoing agentic processing of user data, increasing the chance of unauthorized access, retention, and behavioral profiling in the background.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.