Back to skill

Security audit

MySQL Slow Query Analyzer

Security checks for vulnerabilities and agentic risk

Overview

This is a local MySQL slow-query analysis skill with no evidence of hidden execution, network upload, persistence, or credential access.

Install only if Chinese-language MySQL performance guidance is acceptable. Treat index and rewrite recommendations as heuristics to review with a DBA before applying to production, and avoid exposing the parser directly as a long-running public service without input validation and exception handling.

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 (2)

T09 · Insecure Skill Coding Practices

Note
Location
analyzer_parser.py:128
Finding

Malformed EXPLAIN JSON Causes Unhandled Exceptions

Content
View full analysis
tuple: """Generate warnings and suggestions based on the access type.""" warnings = [] suggestions = [] type_lower = access_type.lower() ``` ### Technical Analysis The parser verifies only that the input is syntactically valid JSON. It does not verify that the decoded value is an object or that nested properties have the expected types. For example: - `[]` or `null` is valid JSON but has no `.get()` method. - `{"query_block":[]}` causes `.get()` to be called on a list. - `{"query_block":{"cost_info":[]}}` causes `.get()` to be called on a list. - `{"query_block":{"table":{"access_type":1}}}` passes the table dictionar ...[truncated 1523 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
mysql_slow_query_analyzer.py:116
Finding

Incomplete Slow-Query Logs Crash Text Report Formatting

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (8)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description is written in Chinese and does not indicate any option for users to choose another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases include broad terms like "查询优化", "mysql explain", and "索引建议", which can activate the skill for general MySQL/database questions rather than only slow-query analysis. This can cause over-invocation, incorrect routing, and potentially unsafe or misleading optimization advice outside the intended scope, though it does not directly introduce code execution or data exfiltration risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language documentation in mixed Chinese and English and later emits warnings/suggestions entirely in Chinese, indicating the skill is designed to communicate in a fixed language. The file does not offer user opt-in for language selection or document that the skill is region-specific, which fits the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

User-facing result strings such as warnings and remediation messages are emitted only in Chinese at these lines, and similar patterns recur throughout the file. Without a user-selectable locale or documented regional limitation, this constitutes a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring explicitly states its functions in Chinese, and the user-facing suggestion and recommendation strings throughout the file are also hard-coded in Chinese. For a general-purpose analyzer, this imposes a specific language/locale without opt-in or documented regional justification, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains user-facing natural-language strings that present usage and reports in Chinese, and there is no option for the user to select another language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python test file contains user-visible natural-language content in Chinese, including the module docstring and many test descriptions, but provides no indication that Chinese is optional or that the skill is intentionally locale-specific. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code presents its description, usage text, examples, and status messages in Chinese only. The file does not provide any language selection, fallback, or opt-in mechanism, which is a natural-language locale policy issue under the rule for forced language without user choice.

Content

No source excerpt is available for this finding.