Back to skill

Security audit

statistics

Security checks for vulnerabilities and agentic risk

Overview

The statistics tool is mostly local and purpose-aligned, but its bundled self-learning logger can persist user notes, preferences, and operation history without clear consent, limits, or cleanup controls.

Install only if you are comfortable with the skill keeping a local learning log. Avoid putting sensitive dataset details, client names, secrets, or private notes into learner records, and consider removing or disabling learner.py/learned_patterns.json if you only need one-off statistical analysis.

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is simple statistical analysis, but the skill also includes persistence, user preference tracking, error-pattern recording, and self-optimization behavior via learned_patterns.json. This mismatch is dangerous because users and orchestrators may invoke the skill expecting read/analyze behavior while it quietly accumulates state, potentially storing sensitive dataset details or operational history beyond the user's intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file is a generic cross-skill telemetry and preference-learning module embedded in a statistics skill, which exceeds the declared scope of doing local statistical analysis on user-provided datasets. It persistently records usage history, errors, notes, and preferences under a shared skills directory, creating unnecessary data collection and cross-skill state that could expose user behavior or sensitive notes without a clear need for the skill’s stated function.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill advertises and appears capable of writing files, but it does not declare any explicit tool scope or permissions boundaries. Undeclared write capability increases the chance that an agent can persist data, modify workspace files, or create logs without user awareness, which weakens least-privilege controls and makes downstream misuse harder to audit.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description says to use this skill when the user needs phrases like "做个统计" and "算相关性", which are broad natural-language requests without clear scope boundaries or exclusion conditions. This can cause unintended invocation for casual or underspecified analysis requests because the file does not define negative examples or narrower trigger constraints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The usage guidance includes example triggers like "算一下相关性" and "这两组有显著差异吗" but does not clearly state required inputs, supported data shapes, or when the skill should not be used. In markdown skill docs, this lack of trigger specificity increases the chance of accidental or inappropriate activation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python skill's docstring, CLI description, and operational messages are written entirely in Chinese, which imposes a specific language on users without any opt-in or alternative locale handling. The policy explicitly flags language or locale constraints when they are forced and not documented as a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code persistently stores user preferences, operation history, error labels, and arbitrary note text in learned_patterns.json, none of which is necessary to compute descriptive statistics, correlations, or t-tests. This creates privacy and data-governance risk because user-supplied notes may contain sensitive content and the file is written without consent, redaction, or retention limits.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The top-level docstring frames the module as only recording usage, preferences, insights, and reflection. However, the reflection output explicitly recommends writing accumulated experience back into the skill's SKILL.md, which goes beyond passive logging/analysis and indicates documentation-maintenance intent not stated in the documented responsibilities.

Content

No source excerpt is available for this finding.