Back to skill

Security audit

IceCube Heartbeat

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clear malware, but it authorizes unattended agent actions that can change memory, push repository updates, and install new skills without adequate controls.

Install only if you are comfortable giving an idle heartbeat agent ongoing authority to inspect personal/work data sources and make persistent changes. Before use, disable automatic commits, pushes, MEMORY.md edits, and skill installation; make email/calendar/weather access explicitly opt-in; and require user approval for every mutating or externally visible action.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:31
Finding

Unapproved Modification of Persistent Agent Memory and Rules

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 31-41
Vulnerability Type: Persistent memory poisoning through autonomous promotion of content
Risk Level: High

Code Snippet:

markdown
### 2. Memory Governance
- Scan `mistake_log.md` for new errors
- Scan `success_patterns.md` for new wins
- Evaluate if memory consolidation needed
- Promote important daily entries to MEMORY.md

### 3. Self-Improvement Detection
- Repeated fallback patterns → flag for optimization
- Repeated rollback patterns → flag for root cause analysis
- Task stagnation (>24h no progress) → alert
- User repeated corrections → update rules

Technical Analysis

The skill instructs the agent to promote entries from mutable log files into MEMORY.md and to update behavioral rules based on repeated user corrections. It does not require user approval, source validation, provenance tracking, or a review process before persistent changes are made.

Content in mistake_log.md, success_patterns.md, conversations, or related workspace files may be influenced by untrusted users or repository content. Treating that content as trusted learning material can convert transient attacker-controlled instructions into persistent agent state. Once promoted, the content may influence unrelated future sessions.

Attack Path

  1. An attacker or untrusted project file introduces a crafted entry into a source monitored by the heartbeat, such as mistake_log.md.
  2. The entry presents a malicious behavioral instruction as a correction, successful pattern, or important lesson.
  3. During an unattended heartbeat, the agent scans the source file.
  4. The agent classifies the crafted entry as important or repeatedly corrected behavior.
  5. The agent writes the content into MEMORY.md or modifies its operating rules.
  6. Future sessions load or rely on the poisoned memory, causing the malicious instruction to persist beyond the origina ...[truncated 524 chars]
Remediation
View remediation

Remediation Suggestions

  • Never write directly to MEMORY.md or behavioral rule files during an unattended heartbeat.
  • Store proposed memory changes in a separate review queue containing the source, timestamp, author, and reason for promotion.
  • Require explicit user approval before promoting any entry into persistent memory.
  • Treat workspace files, logs, retrieved content, and conversation-derived instructions as untrusted input.
  • Apply instruction-injection detection and reject entries that request tool use, permission changes, credential access, or modification of safety constraints.
  • Permit only structured factual memories under a restrictive schema rather than arbitrary instructions.
  • Maintain version history, integrity hashes, and a simple rollback process for all persistent-memory changes.

T08 · Insecure Dependencies

Error
Location
SKILL.md:180
Finding

Unattended Installation of Third-Party Skills from a Mutable Supply Chain

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 180-190
Vulnerability Type: Unreviewed third-party skill installation
Risk Level: High

Code Snippet:

markdown
## Proactive Work Without Asking

These are safe to do during heartbeat:

- Read and organize memory files
- Check on projects (git status)
- Update documentation
- Commit and push your own changes
- Review and update MEMORY.md
- Install new skills from ClawHub
- Run self-improvement routines

Technical Analysis

The skill explicitly authorizes installation of new ClawHub skills without asking the user. The document does not define an allowlist, version pinning, publisher verification, signature or hash validation, static review, sandboxing, or an approval gate.

A skill selected after this package was reviewed is a mutable third-party component and can introduce new instructions or executable code. Consequently, the effective behavior of the agent can change without review of the original package. Merely describing installation as safe does not establish the trustworthiness of downloaded components.

Attack Path

  1. An attacker publishes a malicious skill or compromises an existing relevant skill on ClawHub.
  2. The malicious package is named or described so that it appears relevant to the agent's current projects.
  3. A periodic heartbeat searches for skills and identifies the attacker-controlled package.
  4. Following the authorization to work without asking, the agent installs the package without user review.
  5. The newly installed skill is loaded or invoked.
  6. Its instructions or scripts operate with the agent's available file, network, repository, or service permissions.

Impact Assessment

Exploitation can introduce arbitrary hostile skill instructions and potentially executable components into the agent environment. The resulting privileges depend on the runtime permissions granted to installed skills, ...[truncated 238 chars]

Remediation
View remediation

Remediation Suggestions

  • Change the heartbeat behavior from automatic installation to notification-only discovery.
  • Require explicit user approval for every installation and upgrade.
  • Restrict installation to an administrator-maintained allowlist of trusted publishers and package identifiers.
  • Pin exact versions and verify cryptographic hashes or signatures before installation.
  • Perform static review of skill instructions and scripts before activation.
  • Install and test new skills in an isolated environment without credentials, private memory, or write access to active projects.
  • Record package origin, resolved version, integrity digest, review result, and installation time.
  • Prevent installed skills from being activated automatically merely because discovery or installation succeeded.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:180
Finding

Autonomous Repository Changes and Remote Push Without User Approval

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 180-190
Vulnerability Type: Unauthorized use of repository write and publication privileges
Risk Level: High

Code Snippet:

markdown
## Proactive Work Without Asking

These are safe to do during heartbeat:

- Read and organize memory files
- Check on projects (git status)
- Update documentation
- Commit and push your own changes
- Review and update MEMORY.md
- Install new skills from ClawHub
- Run self-improvement routines

Technical Analysis

The skill authorizes the agent to modify project files, create commits, and push changes to a remote repository without asking the user. It does not restrict the operation to a particular repository, file set, branch, remote, or commit type. It also lacks a diff-review requirement and does not specify least-privilege credentials or protected-branch controls.

A remote push is a security-sensitive side effect rather than routine maintenance. If malicious repository content, poisoned memory, or an unsafe installed skill influences the proposed changes, the heartbeat can publish those changes using credentials already available to the agent.

Attack Path

  1. An attacker places crafted instructions in a repository file, issue-derived content, log, or agent memory accessible during heartbeat processing.
  2. The content persuades the agent that a source-code, configuration, workflow, or documentation change is an appropriate maintenance improvement.
  3. The agent edits the repository during an unattended heartbeat.
  4. Under the explicit instruction to work without asking, it commits the changes.
  5. The agent uses configured Git credentials to push the commit to a remote branch.
  6. The pushed change becomes visible to collaborators or triggers repository automation such as CI/CD workflows.

Impact Assessment

The affected privileges include local repository write access and remote Git pu ...[truncated 390 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove permission to commit or push changes during unattended heartbeat execution.
  • Limit heartbeats to read-only checks and generation of proposed patches.
  • Present the complete diff, destination repository, branch, and commit message for explicit user approval.
  • Use separate least-privilege Git credentials that cannot write to protected or production branches.
  • Require pull requests, mandatory review, status checks, and branch protection for agent-generated changes.
  • Block modifications to sensitive paths such as CI workflows, hooks, deployment manifests, dependency files, and credential-related configuration unless separately approved.
  • Run secret scanning and policy validation before allowing a commit.
  • Log every attempted repository mutation and provide a reliable rollback procedure.

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:85
Finding

Strict Recurring Heartbeat Instructions Enable Broad Unattended Agent Actions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 85-94
Vulnerability Type: Recurring instruction hijacking through an automatically loaded control file
Risk Level: Medium

Code Snippet:

markdown
### 2. Configure Heartbeat Interval

In OpenClaw config:
```json
{
  "agents": {
    "heartbeat": {
      "intervalMs": 1800000,  // 30 minutes
      "prompt": "Read HEARTBEAT.md. Follow it strictly. Reply HEARTBEAT_OK if nothing needs attention."
    }
  }
}
text

### Technical Analysis

The configuration causes `HEARTBEAT.md` to be loaded every 30 minutes and directs the agent to follow it strictly. The skill's broader instructions associate this recurring execution with access to cron state, agent sessions, email, calendar data, memory files, repositories, and skill installation.

The configuration does not state that platform safety rules and current user authorization take precedence, nor does it define an integrity boundary for `HEARTBEAT.md`. If that file is modified by an untrusted process, repository operation, installed skill, or poisoned memory workflow, its replacement instructions will be repeatedly supplied to the agent.

### Attack Path

1. An attacker gains an indirect path to influence or modify `HEARTBEAT.md`, such as through malicious project instructions, an unsafe installed skill, or an overbroad maintenance edit.
2. The attacker inserts instructions requesting sensitive reads, external actions, or mutating tool calls.
3. The next scheduled heartbeat automatically loads the modified file.
4. The prompt directs the agent to follow the file strictly.
5. The agent executes the attacker-influenced instructions using whatever tools and service integrations are available.
6. The process repeats at each interval until the file is corrected or heartbeat execution is disabled.

### Impact Assessment

The direct effect is recurring influence over the agent's session goal
...[truncated 408 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace “Follow it strictly” with language explicitly subordinate to system safety policies, current user authorization, and least-privilege rules.
  • Keep heartbeat operations read-only by default and require confirmation for every mutating or externally visible action.
  • Protect HEARTBEAT.md with restrictive file permissions and integrity verification.
  • Keep the control file outside untrusted repositories and prevent installed skills from modifying it.
  • Define a narrow allowlist of heartbeat checks rather than permitting open-ended instructions.
  • Make email, calendar, repository, session, and operational integrations independently opt-in.
  • Do not expose message bodies, credentials, or unrelated private data during routine health checks.
  • Disable execution and alert the user if the heartbeat control file changes unexpectedly or fails integrity validation.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Scope Creep

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The metadata claims no required permissions, yet the skill directs the agent to check ClawHub, email, calendar, weather, and external notification sources. That mismatch hides network and integration reach from the permission model and can lead to unintended external access or data exposure during autonomous heartbeat runs.

Content

No source excerpt is available for this finding.

Scope Creep

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The metadata claims no required permissions, yet the skill directs the agent to check ClawHub, email, calendar, weather, and external notification sources. That mismatch hides network and integration reach from the permission model and can lead to unintended external access or data exposure during autonomous heartbeat runs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Allowing the agent to autonomously install new skills is a major scope expansion from maintenance into self-extension. This is dangerous because it lets the agent change its own capabilities over time, potentially importing unreviewed instructions, broader permissions, or malicious content without user review.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is framed as routine idle maintenance, but its documented behavior expands into autonomous repository changes, memory mutation, and installation of new skills. This broadening is dangerous because users may enable a seemingly harmless heartbeat utility without realizing it can materially change the system and expand its own capabilities.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Proactive outreach based on email, calendar, or weather goes beyond heartbeat maintenance and introduces access to personal/external data plus unsolicited messaging behavior. In an autonomous polling loop, this can create privacy issues, notification spam, and unexpected disclosure of user context.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The section labeled 'Proactive Work Without Asking' authorizes autonomous decision-making during idle periods, including state changes and capability expansion. In security-sensitive agent systems, unsupervised actions are dangerous because they reduce human oversight and can chain into broader modification, persistence, or data access behaviors.

Content

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

md
- Keep heartbeat-state.json for tracking
- Batch checks to reduce API calls

## Proactive Work Without Asking

These are safe to do during heartbeat:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly authorizes commit, push, documentation updates, and skill installation during heartbeat without a clear user-facing warning that the agent may alter code, repository history, or system state. Silent autonomous modification is risky because it can introduce unauthorized changes, operational disruption, or hard-to-audit side effects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The example HEARTBEAT.md template is written in Chinese and presented as the canonical setup content, while the rest of the skill description is in English. There is no indication that language choice is optional or that the skill is intended for a Chinese-specific environment, which creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.