Back to skill

Security audit

Mysql Skill 1.0.0 (3)

Security checks for vulnerabilities and agentic risk

Overview

This MySQL management skill is coherent, but it can guide destructive database changes and credential storage without enough safeguards.

Install only if you intend to use a Chinese-language MySQL administration helper and can restrict it to least-privilege database accounts. Avoid production credentials unless you add your own safeguards: review generated SQL before execution, require explicit confirmation for writes/restores, back up first, use transactions where possible, and store credentials with restrictive permissions or a safer secret mechanism.

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
SKILL.md:63
Finding

Database Credentials May Be Exposed Through Insecure Storage Guidance

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 63–77
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: Medium

Vulnerable Code

ini
[client]
host = localhost
user = your_username
password = your_password
database = your_database
bash
export MYSQL_HOST=localhost
export MYSQL_USER=your_username
export MYSQL_PASSWORD=your_password
export MYSQL_DATABASE=your_database

Technical Analysis

The Skill recommends placing a plaintext MySQL password in ~/.my.cnf but does not instruct the user to restrict that file's permissions. If the file is readable by other local users or is included in an insecure backup, the database credentials can be disclosed.

The alternative recommendation exports the password through the MYSQL_PASSWORD environment variable. Environment variables may be inherited by child processes or captured by diagnostic tools, process inspection facilities, crash reports, shell configuration files, and CI/CD logs. Persisting the export command in a shell initialization file would further increase the exposure period.

The example values are placeholders rather than embedded real credentials. The risk arises when users replace them with operational credentials while following the documented configuration procedure.

Attack Path

  1. A user follows the Skill instructions and replaces your_password with a valid MySQL password.
  2. The user saves the password in ~/.my.cnf without restrictive permissions or exports it into a broadly observable process environment.
  3. An attacker with access to another local account, an exposed backup, a diagnostic artifact, or a process capable of inspecting the environment obtains the credential.
  4. The attacker connects to the configured MySQL server using the disclosed username and password.
  5. The attacker performs operations allowed by that database account.

This exploitation path requires access to the credential-bearing host, its backups or di ...[truncated 760 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require restrictive permissions when using an option file:
bash
touch ~/.my.cnf
chmod 600 ~/.my.cnf
  1. Prefer MySQL's encrypted login-path facility instead of directly documenting plaintext password storage:
bash
mysql_config_editor set \
  --login-path=mysql-skill \
  --host=localhost \
  --user=your_username \
  --password

Then connect with:

bash
mysql --login-path=mysql-skill your_database
  1. Avoid recommending persistent MYSQL_PASSWORD exports. If environment-based injection is unavoidable, provide the secret only to the required process through a dedicated secret manager and remove it immediately afterward.

  2. Warn users not to place credentials in shell history, command-line arguments, source-controlled files, logs, or unencrypted backups.

  3. Require a dedicated least-privilege MySQL account. Read-only workflows should use an account with only the required SELECT privileges. Schema changes, restores, destructive writes, and global settings should use separately controlled privileged accounts.

  4. Recommend credential rotation if the option file, environment, logs, diagnostics, or backups may already have exposed the password.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly supports destructive operations like UPDATE, DELETE, schema changes, and restore actions but does not require confirmation, risk acknowledgement, or preview-before-execution. In a database administration context, this omission is dangerous because natural-language misunderstandings can directly lead to irreversible data loss or corruption.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · package.json (reported line 26)May include surrounding context.

json
"kind": "system",
        "label": "Install MySQL Client",
        "commands": {
          "ubuntu": "sudo apt update && sudo apt install -y mysql-client",
          "macos": "brew install mysql-client"
        }
      }

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises very broad natural-language activation criteria around MySQL and database tasks, which can cause it to trigger in many ordinary conversations without clear scoping or safety gating. In a skill that can generate and support destructive SQL and backup/restore operations, ambiguous activation increases the chance of unintended execution paths or unsafe guidance.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

Ubuntu/Debian:

bash
sudo apt update
sudo apt install mysql-client

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

Ubuntu/Debian:

bash
sudo apt update
sudo apt install mysql-client

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill recommends storing database credentials in ~/.my.cnf with a plaintext password example and does not clearly warn about file-permission hardening or safer alternatives. Plaintext credential storage can expose database access to other local users, malware, backups, or accidental disclosure, especially on shared or poorly secured systems.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes activation for broad natural-language references to MySQL and database tasks without strong trigger constraints or confirmation boundaries. In an agent ecosystem, this can cause the skill to be invoked in ambiguous contexts and perform sensitive database operations when the user may not have intended to grant that scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description explicitly advertises destructive capabilities like INSERT/UPDATE/DELETE, table management, and backup/restore, but provides no warning, guardrails, or indication of user confirmation for dangerous actions. In a database-management skill, this increases the chance of unintended destructive operations against production data.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
86% confidence
Finding

The install command uses sudo to perform system package installation, which requires elevated privileges and increases the blast radius of any installation-time mistake or supply-chain compromise. While package installation often legitimately needs admin rights, embedding privileged commands in a skill manifest is still security-relevant because users may run them with high trust.

Content

Scanner excerpt · package.json (reported line 26)May include surrounding context.

json
"kind": "system",
        "label": "Install MySQL Client",
        "commands": {
          "ubuntu": "sudo apt update && sudo apt install -y mysql-client",
          "macos": "brew install mysql-client"
        }
      }

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The description, examples, and user interaction text are presented entirely in Chinese, and the skill does not indicate that language selection is optional or user-configurable. This may impose a language/locale constraint without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The primary natural-language description is written only in Chinese, with no indication that the skill supports other languages or that Chinese is a required locale for a justified regional use case. This may violate language/locale policy if users are not offered a choice or informed of the locale restriction.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.