Back to skill

Security audit

agent-analytics-report

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report unsafe handling of report content, overly broad data collection and default file writes, plus incomplete analysis of some material.

The verdict is suspicious, so consider the reported collection scope, default file writes, HTML report handling, and possible report inaccuracies before installing. Some documentation analysis was partial, so the scan does not provide complete coverage.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_report.py
Finding

Unescaped response-derived model names inject active content into HTML reports

Content
View full analysis

Impact

A model name such as survives normalization and breaks out of the displayed code block. When the resulting report is opened, injected script can alter the report and read or transmit its rendered contents, subject to browser restrictions. This does not establish arbitrary local-file access or host command execution.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (23)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
DUMATE_HOME 覆盖;**数据归属未证实,报告内容可能完全是 WorkBuddy 的,勿当作百度搭子用量引用**);更多 Agent 可扩展(详见 docs/ADAPTERS.md)。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> 本文件是**操作手册**。详细的数据源路径、计价表、Token/成本口径、任务分类规则、36 问 FAQ 收口到 `references/FAQ.md` 与 `docs/ADAPTERS.md`,按需查阅,不在此展开。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 详细数据源路径、已知偏差、适配器接缝与验收清单:`docs/ADAPTERS.md`

The invocation example includes an unqualified request for a weekly report (「周报」).

Medium
Category
Trigger Abuse
Confidence
86% confidence
Finding

The documented invocation allows 「周报」 without requiring the request to concern Agent usage, tokens, or costs. This overlaps with ordinary work-status reporting and does not include an exclusion or clarification condition in this file.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The default execution workflow writes files without a user-selected output path.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The default workflow supplies fixed data.json and report.md output paths despite promising no file writes unless the user explicitly selects an output path. Following these operational instructions can persist private usage data unexpectedly and potentially overwrite existing files in the working directory.

Content

No source excerpt is available for this finding.

Claude Code cost calculations omit billable cache tokens and discount uncached input again.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Claude usage separates uncached input, cache reads, and cache creation, but the monetary calculation charges only uncached input and output. Subtracting cached tokens again from uncached input further understates effective cost, compromising report integrity and potentially suppressing cost anomalies in this cost-analysis skill.

Content

No source excerpt is available for this finding.

Codex discovery recursively reads arbitrary JSONL files beyond the declared rollout/date-directory scope.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The recursive *.jsonl discovery reads every matching file beneath the sessions root, rather than restricting collection to the advertised rollout files and date-directory layout. Unrelated or archived JSONL content can therefore be read and, if it matches the parser's schema and window checks, have private metadata included in reports.

Content

No source excerpt is available for this finding.

Unreadable files and malformed usage records are silently discarded despite the promised dirty-data warnings.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

Read failures and invalid JSON lines are silently skipped, while decoding errors are ignored, leaving downstream reports without evidence that collection was incomplete. This undermines the promised dirty-data warnings and can conceal missing usage or distort anomaly detection, although it does not itself demonstrate data exfiltration or code execution.

Content

No source excerpt is available for this finding.

Malformed transcript records are silently discarded despite the manifest's promise to explicitly warn about dirty data.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

Malformed JSONL records and file-read failures are silently ignored without recording that the resulting report is incomplete. Corruption or deliberate modification of source logs can therefore suppress usage evidence while producing an apparently successful report, undermining this skill's accounting and anomaly-detection functions.

Content

No source excerpt is available for this finding.

Synthetic responses are excluded from traces only after their content has entered subsequent input-token estimates.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

Synthetic response content is accumulated into out_tokens and then settled into ctx before synthetic groups are excluded from emitted traces. Consequently, placeholder or injected synthetic content can inflate subsequent input-token estimates despite not representing a real model response; this affects report integrity rather than actual provider billing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · config.json (reported line 10)May include surrounding context.

json
"version": "1.9.15",


  "update_url": "https://api.skillhub.cn/api/v1/skills/agent-analytics-report",


  "note": "skillhub upgrade 读取 update_url 拉取 manifest JSON(需含 version 字段以比对版本)。已实测:GET 该端点无需 token 即返回 200,且含 latestVersion.version(当前 1.1.2),与升级解析逻辑匹配。请勿改回带 ?namespace= 的旧值(实测返回 405 Method Not Allowed)。本地自定义模型一律写在 scripts/pricing.local.json,不进本发布包。"

The demonstrated response to an ordinary report request writes files without an explicit user output-path request.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The example maps a normal usage-report request directly to commands that persist data.json and a Markdown report without asking the user for a destination. Although this is documentation rather than executable logic, an agent copying the demonstrated workflow would violate the explicit no-default-write boundary and could expose private activity data or overwrite existing files.

Content

No source excerpt is available for this finding.

The automatic natural-language example creates files despite the no-write default.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The example explicitly describes automatic execution after a report request, but supplies --output for both raw collected data and the rendered report without the user choosing file output. Following this example would bypass the stated no-write default, persist potentially sensitive usage information, and potentially overwrite existing files with those fixed names.

Content

No source excerpt is available for this finding.

Generic usage-report requests are presented as sufficient to trigger automatic collection.

Medium
Category
Trigger Abuse
Confidence
93% confidence
Finding

The example says that 「生成这周的使用报告」 automatically executes the collector, without establishing that the user means Agent usage rather than another product or service. The monthly example at L35 repeats this ambiguity, and the file provides no exclusion or clarification requirement.

Content

No source excerpt is available for this finding.

Invocation examples include generic reporting and spending requests without an Agent-usage constraint.

Medium
Category
Trigger Abuse
Confidence
98% confidence
Finding

The phrases “生成周报” (generate a weekly report) and “统计下这个月花了多少” (calculate how much was spent this month) can refer to ordinary work reporting or personal finances. The text says these requests automatically initiate collection and rendering, without requiring an explicit Agent/token-usage context or providing exclusions.

Content

No source excerpt is available for this finding.

Session-level 'Token consumption' anomalies are selected by call count instead of token consumption.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The session-level token anomaly branch calculates its threshold and selects sessions using call count, but presents effective token consumption as the anomaly value. A session consuming unusually many tokens in relatively few calls can therefore evade session-level detection, undermining the report's usage-monitoring integrity; independent daily detection limits but does not eliminate this gap.

Content

No source excerpt is available for this finding.

Trace pricing discards the custom endpoint identifier before selecting rates.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The collector retains the endpoint-qualified model identifier in raw_model, but selects pricing_model from exec_model first, which normally contains only the bare model name. For custom endpoints sharing a model name with an official service, this can bypass endpoint-specific pricing and free-period rules, producing incorrect costs despite correctly separating the channels in report aggregation. This is particularly relevant to a usage-and-cost reporting skill: it compromises report integrity, although the shown code does not establish data exfiltration or code execution.

Content

No source excerpt is available for this finding.

The pricing lookup promises graceful recovery from any network/parse failure, but some such failures terminate report generation.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

A malformed pricing response such as {"models": null} raises an uncaught AttributeError, and some transport failures such as read timeouts also escape the listed exception handlers. Because this lookup runs before report output, an unreliable or compromised pricing endpoint can abort the entire report rather than merely omit optional pricing estimates. Exposure is limited because users must explicitly enable online lookup and supply an endpoint, and unconfigured models must be present.

Content

No source excerpt is available for this finding.

The 'most expensive model' fallback includes models that the documentation explicitly excludes.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

When no eligible models remain, the fallback reintroduces low-confidence models and ultimately router aliases, while the resulting heading still claims these categories are excluded. In a usage-and-cost reporting skill, this creates a misleading financial recommendation that could prompt inappropriate model changes or spending decisions; the surrounding estimate disclaimers reduce, but do not eliminate, that risk.

Content

No source excerpt is available for this finding.

The documented fail-safe classifier can propagate malformed-response errors instead of falling back to local classification.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

Valid JSON with an unexpected structure can raise uncaught AttributeError or TypeError during response extraction or string handling, bypassing the classifier's documented heuristic fallback. A faulty or compromised endpoint can consequently interrupt classification and potentially report generation, although exposure is limited to the explicitly enabled LLM mode and no code execution is demonstrated.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · adapters/dumate.py (reported line 144)May include surrounding context.

python
用于支持 DUMATE_HOME 覆盖,同时保证多次调用之间无全局状态残留。
    """
    new_paths = _child_paths(home)
    saved = {name: getattr(cs, name) for name in _PATH_ATTRS}
    try:
        for name, value in new_paths.items():
            setattr(cs, name, value)

The module claims to perform no I/O but reads configuration files during import.

Low
Category
Excessive Agency
Confidence
99% confidence
Finding

L0006 explicitly states that this module contains no I/O. In fact, L0425 invokes _load_pricing_config() at import time, reading pricing.json and pricing.local.json (L0296–L0299 and L0350–L0353) and unconditionally invoking a loader for ~/.workbuddy/cache/acc-product-config-v3.json (L0397, L0246–L0250). These reads are reasonable for analytics, but contradict the module's stated side-effect boundary and occur without an explicit caller request.

Content

No source excerpt is available for this finding.