Back to skill

Security audit

TokenQrusher

Security checks for vulnerabilities and agentic risk

Overview

This skill is a Review item because it persistently changes what context and heartbeat information an agent receives, and some defaults can suppress policy context or falsely report monitoring success.

Install only if you are comfortable with automatic hooks changing agent context on every bootstrap. Review and adjust the allowed file lists so mandatory policy, tool, memory, and safety files are never filtered out, treat the heartbeat feature as unimplemented or advisory until it performs real checks, and avoid copying the hard-coded model override template unless you explicitly want that provider/model.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (4)

T01 · Skill Instruction Hijacking

Error
Location
hooks/token-context/handler.js:56
Finding

Bootstrap Context Filtering Can Remove Security-Critical Agent Instructions

Content
View full analysis
f.name); const filteredFiles = currentFiles.filter(f => shared.isValidFileName(f.name) && allowedFiles.includes(f.name) ); const removed = currentFileNames.filter(f => !allowedFiles.includes(f)); // Log results if (removed.length > 0) { console.log(`[token-context] 📉 ${currentFileNames.length} → ${filteredFiles.length} files`); console.log(`[token-context] Removed: ${removed.join(', ')}`); } else { console.log(`[token-context] ✓ ${filteredFiles.length} files (${classification.level})`); } // Apply filter if (!config.dryRun) { context.bootstrapFiles = filteredFiles; } ``` The default file sets are: ```javascript // hooks/token-shared/shared.js:232-240 const getAllowedFiles = (level, customConfig) => { const defaults = { simple: ['SOUL.md', 'IDENTITY.md'], standard: ['SOUL.md', 'IDENTITY.md', 'USER.md'], complex: ['SOUL.md', 'IDENTITY.md', 'USER.md', 'TOOLS.md', 'AGENTS.md', 'MEMORY.md', 'HEARTBEAT.md'] }; ``` ### Technical Analysis The hook is registered for every `agent:bootstrap` event and mutates `context.bootstrapFiles`. Its narrow regular-expression classifier defaults most messages to the `standard` category, which retains only `SOUL.md`, `IDENTITY.md`, and `USER.md`. Consequently, ordinary code, file, or tool-related requests can be processed without `AGENTS.md`, `TOOLS.md`, `MEMORY.md`, or `HEARTBEAT.md`. These files may contain operation ...[truncated 1522 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
templates/HEARTBEAT.md:3
Finding

Bundled Heartbeat Templates Force a Third-Party Session Model and Restrict Agent Output

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
hooks/token-heartbeat/handler.js:125
Finding

Heartbeat Hook Reports Successful Monitoring Although Checks Are Only Simulated

Content
View full analysis
r.hadAlerts); if (alerts.length === 0) { return 'HEARTBEAT_OK'; } ``` ### Technical Analysis The hook claims to optimize email, calendar, weather, and monitoring checks, but `runChecks` does not access any of those services. It hard-codes `hadAlerts` to `false`, while `updateCheckState` performs no update. Every simulated check therefore produces a no-alert result, which `formatResponse` converts to `HEARTBEAT_OK`. This is a fail-open design: the absence of an implemented check is represented as a successful, alert-free check rather than as unavailable or unsupported. The hook is registered for all `agent:bootstrap` events and contains a comment explicitly stating that it always processes rather than enforcing ...[truncated 1146 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/heartbeat_optimizer.py:27
Finding

Heartbeat State Uses Non-Atomic Default-Permission Writes and Has a Broken Error Path

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (49)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · CHANGELOG.md (reported line 237)May include surrounding context.

Migration steps:

bash
# 1. Update skill
clawhub update tokenQrusher

# 2. Reinstall hooks (if needed)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The matched command rm -rf ~/.openclaw/hooks/token-model is a true risky pattern because it irreversibly deletes a directory tree under the user's home folder. Although apparently intended for legitimate cleanup during migration, publishing this exact command without safeguards increases the chance of operational mistakes and data loss.

Content

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

  1. Remove old hook directories (they will no longer be used):
    bash
    rm -rf ~/.openclaw/hooks/token-model
    rm -rf ~/.openclaw/hooks/token-usage
    rm -rf ~/.openclaw/hooks/token-cron
    

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The matched command rm -rf ~/.openclaw/hooks/token-model is a true risky pattern because it irreversibly deletes a directory tree under the user's home folder. Although apparently intended for legitimate cleanup during migration, publishing this exact command without safeguards increases the chance of operational mistakes and data loss.

Content

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

  1. Remove old hook directories (they will no longer be used):
    bash
    rm -rf ~/.openclaw/hooks/token-model
    rm -rf ~/.openclaw/hooks/token-usage
    rm -rf ~/.openclaw/hooks/token-cron
    

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The command rm -rf ~/.openclaw/hooks/token-usage is a destructive operation that permanently removes a user-local directory tree. In a migration document, this is more dangerous than internal code because it invites direct user execution and does not include a warning or pre-checks.

Content

Scanner excerpt · MIGRATION.md (reported line 40)May include surrounding context.

  1. Remove old hook directories (they will no longer be used):
    bash
    rm -rf ~/.openclaw/hooks/token-model
    rm -rf ~/.openclaw/hooks/token-usage
    rm -rf ~/.openclaw/hooks/token-cron
    

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The command rm -rf ~/.openclaw/hooks/token-usage is a destructive operation that permanently removes a user-local directory tree. In a migration document, this is more dangerous than internal code because it invites direct user execution and does not include a warning or pre-checks.

Content

Scanner excerpt · MIGRATION.md (reported line 40)May include surrounding context.

  1. Remove old hook directories (they will no longer be used):
    bash
    rm -rf ~/.openclaw/hooks/token-model
    rm -rf ~/.openclaw/hooks/token-usage
    rm -rf ~/.openclaw/hooks/token-cron
    

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The command rm -rf ~/.openclaw/hooks/token-cron is a forceful recursive delete and therefore a genuine safety issue in user-facing documentation. The path specificity reduces the likelihood of malicious intent, but not the risk of accidental destructive execution if the path is modified, aliased, or misunderstood.

Content

Scanner excerpt · MIGRATION.md (reported line 41)May include surrounding context.

bash
   rm -rf ~/.openclaw/hooks/token-model
   rm -rf ~/.openclaw/hooks/token-usage
   rm -rf ~/.openclaw/hooks/token-cron
  1. Update the skill:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The command rm -rf ~/.openclaw/hooks/token-cron is a forceful recursive delete and therefore a genuine safety issue in user-facing documentation. The path specificity reduces the likelihood of malicious intent, but not the risk of accidental destructive execution if the path is modified, aliased, or misunderstood.

Content

Scanner excerpt · MIGRATION.md (reported line 41)May include surrounding context.

bash
   rm -rf ~/.openclaw/hooks/token-model
   rm -rf ~/.openclaw/hooks/token-usage
   rm -rf ~/.openclaw/hooks/token-cron
  1. Update the skill:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The specific command 'rm -rf ~/.openclaw/hooks/token-model' is destructive and irreversible. It is somewhat less dangerous than a generic 'rm -rf ~' because the path is constrained, but it still represents unsafe documentation practice that could cause unintended data loss if users mistype the path, use elevated privileges, or generalize the pattern elsewhere.

Content

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

openclaw hooks disable token-model openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The specific command 'rm -rf ~/.openclaw/hooks/token-model' is destructive and irreversible. It is somewhat less dangerous than a generic 'rm -rf ~' because the path is constrained, but it still represents unsafe documentation practice that could cause unintended data loss if users mistype the path, use elevated privileges, or generalize the pattern elsewhere.

Content

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

openclaw hooks disable token-model openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The command 'rm -rf ~/.openclaw/hooks/token-usage' permanently deletes a local directory without confirmation. In a README, this can be dangerous because users often execute migration steps verbatim, and destructive shell examples can be misused or accidentally broadened beyond their intended target.

Content

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

openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The command 'rm -rf ~/.openclaw/hooks/token-usage' permanently deletes a local directory without confirmation. In a README, this can be dangerous because users often execute migration steps verbatim, and destructive shell examples can be misused or accidentally broadened beyond their intended target.

Content

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

openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The command 'rm -rf ~/.openclaw/hooks/token-cron' is an irreversible deletion instruction embedded in migration guidance. Although scoped to an application directory and likely intended for cleanup, it remains risky documentation because it encourages direct destructive shell use without any protective controls or warnings.

Content

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

openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

2. Update the skill:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The command 'rm -rf ~/.openclaw/hooks/token-cron' is an irreversible deletion instruction embedded in migration guidance. Although scoped to an application directory and likely intended for cleanup, it remains risky documentation because it encourages direct destructive shell use without any protective controls or warnings.

Content

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

openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

2. Update the skill:

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill's advertised role does not clearly communicate that it performs heartbeat throttling, quiet-hours suppression, and persistent local state management. In context, this is especially risky because it can silently affect availability or timeliness of checks while appearing to be only a cost-saving prompt optimization tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill's advertised role does not clearly communicate that it performs heartbeat throttling, quiet-hours suppression, and persistent local state management. In context, this is especially risky because it can silently affect availability or timeliness of checks while appearing to be only a cost-saving prompt optimization tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill's advertised role does not clearly communicate that it performs heartbeat throttling, quiet-hours suppression, and persistent local state management. In context, this is especially risky because it can silently affect availability or timeliness of checks while appearing to be only a cost-saving prompt optimization tool.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

openclaw hooks disable token-model openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

openclaw hooks disable token-model openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

openclaw hooks disable token-model openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

openclaw hooks disable token-model openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

openclaw hooks disable token-usage openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

openclaw hooks disable token-cron rm -rf ~/.openclaw/hooks/token-model rm -rf ~/.openclaw/hooks/token-usage rm -rf ~/.openclaw/hooks/token-cron

text

2. Update the skill:

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The security manifest asserts no external endpoints or local file access, yet the CLI executes external OpenClaw commands that can inspect and alter local system state. Misstating security-relevant behavior is dangerous because reviewers and users may trust the manifest and execute the tool under false assumptions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest and description frame the tool as optimization-focused, but the CLI also enables hooks and claims cron-job installation behavior, which are operational persistence and configuration actions. This mismatch is dangerous because it can smuggle administrative changes behind a benign label, making users more likely to run it without proper scrutiny.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The install command modifies OpenClaw hook configuration, an administrative action not justified by the advertised token optimization role. In the context of an agent skill, hidden config mutation is especially risky because it can establish ongoing behavior changes in the host environment beyond a single invocation.

Content

No source excerpt is available for this finding.