Back to skill

Security audit

Token Economy

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed cost-control skill that affects model choice and token logging, with no executable payload in the reviewed package.

Install this only if you want OpenClaw behavior optimized for cost. Review the model auto-switching, context caps, budget cap, and token audit log behavior, and verify any external fork or cron implementation separately because this package only documents those mechanisms.

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
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • 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 (2)

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · SECURITY.md (reported line 5)May include surrounding context.

md
# Security Notice - Token Economy

## Purpose

Token Economy is a **COST OPTIMIZATION TOOL** that reduces OpenClaw token costs through intelligent model routing. It does NOT contain malicious code.

## What This Tool Does

✅ **Routes requests** to cheaper models first (GPT-4o → Sonnet → Opus)  
✅ **Caps context size** to prevent runaway costs  
✅ **Tracks token usage** for transparency and budgeting  
✅ **Enforces budget limits** to prevent surprise bills  
✅ **Optimizes heartbeats** to eliminate unnecessary API calls

## What This Tool Does NOT Do

❌ **Does NOT steal API keys** - Uses existing configured keys  
❌ **Does NOT send data externally** - All routing happens locally  
❌ **Does NOT modify user data** - Only

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · SECURITY.md (reported line 20)May include surrounding context.

md
❌ **Does NOT steal API keys** - Uses existing configured keys  
❌ **Does NOT send data externally** - All routing happens locally  
❌ **Does NOT modify user data** - Only affects model selection  
❌ **Does NOT bypass security** - Works within OpenClaw's architecture

## Why References to API Keys Exist