Back to skill

Security audit

Token Cockpit

Security checks for vulnerabilities and agentic risk

Overview

Token Cockpit locally analyzes OpenClaw usage logs for cost estimates, with no evidence of exfiltration, persistence, or unsafe mutation.

Install this only if you want an agent to read local OpenClaw usage logs and summarize model spend. Review which log path is used, prefer passing --logs explicitly for sensitive environments, and treat dollar amounts as estimates unless you supply current pricing.

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
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · token_cockpit.py (reported line 97)May include surrounding context.

python
rules.append((k.lower(), (float(v["input"]), float(v["output"]))))
            else:
                rules.append((k.lower(), (float(v[0]), float(v[1]))))
        return rules
    return DEFAULT_PRICES

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs the agent to read local usage logs and auto-detect common filesystem locations and environment-derived paths, but it declares no explicit tool scope or permissions boundary. That creates an avoidable least-privilege failure: an agent may access local files or environment-provided paths more broadly than users expect, increasing the risk of unintended disclosure of local usage data or adjacent files if path handling is loose.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The 'When to use this' section says 'Any time cost or usage comes up' and lists several common conversational phrases such as 'how much am I spending' and 'why is my bill so high.' This is broad enough to overlap with ordinary discussion and does not provide exclusion conditions or context limits, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.