Back to skill

Security audit

AI Token消耗监控

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently monitors AI token usage from local session logs and stores derived usage summaries, with no evidence of exfiltration or hidden execution.

Install only if you are comfortable letting the skill read local QClaw session logs to compute token totals. It does not appear to transmit data externally, but session logs may contain sensitive conversation history, and the generated usage summaries persist under workspace memory until deleted.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill describes reading session logs and writing per-day statistics, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization ambiguity where the runtime or user may not clearly understand that local file access is required, increasing the risk of unintended access to sensitive local data if the skill is triggered.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states that it reads session logs and stores derived statistics, but it does not disclose the privacy implications of analyzing potentially sensitive conversation history or persisting summaries to disk. Users may unknowingly expose prompts, outputs, usage patterns, or other metadata contained in local session logs, making accidental data disclosure more likely.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases include very generic terms like "Token", "费用", and "统计", which can easily appear in normal conversation unrelated to this skill. Overbroad triggers increase the chance of accidental activation, which is especially risky here because the skill is designed to inspect session logs and produce stored statistics from local data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module title and user-facing description are written in Chinese, and the script's interface continues in Chinese-only prompts and output. This creates a locale policy issue because the skill does not provide user opt-in or an alternative language despite imposing a specific language on all users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The natural-language instructions and trigger examples are presented only in Chinese, which can imply a locale-specific requirement or forced language behavior. There is no explicit opt-in, alternative language support, or justification that this skill is intentionally limited to a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes monitoring, reading logs, anomaly detection, and optimization advice, which implies analysis of existing data. The code goes beyond read-only monitoring by creating directories and writing per-day JSON records under ~/.qclaw/workspace/memory, adding a persistence side effect not stated in the manifest.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.