Back to skill

Security audit

Db Explorer

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent database helper, but it includes high-impact database restore/import/export workflows and unsafe command examples that need careful review before use.

Install only if you are comfortable with an agent receiving database credentials and potentially running export, backup, restore, and migration commands. Use least-privilege or read-only database accounts, avoid putting passwords directly in commands, avoid production Redis KEYS scans, and require explicit confirmation plus target validation before any restore, import, migration, or full export.

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

Warning
Location
SKILL.md:49
Finding
Database Credentials Exposed Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:49-51, 68-70` **Vulnerability Type**: Credential exposure through process arguments and shell history **Risk Level**: Medium ### Vulnerable Code ```bash # PostgreSQL psql "postgresql://user:password@host:5432/dbname" -c "\dt" psql "postgresql://user:password@host:5432/dbname" -c "\d table_name" psql "postgresql://user:password@host:5432/dbname" -c "SELECT count(*) FROM table_name;" # Redis redis-cli -h host -p 6379 -a password INFO keyspace redis-cli -h host -p 6379 -a password DBSIZE redis-cli -h host -p 6379 -a password KEYS "*" ``` ### Technical Analysis The documented examples instruct users to place database passwords directly in command-line arguments. If users replace the placeholders with real credentials, those secrets can be retained in shell-history files, terminal session logs, audit records, and automation logs. Depending on the operating system and process isolation settings, command arguments may also be visible to other local users through process-inspection interfaces. Using a password-bearing connection string does not prevent this disclosure when the entire string is supplied as a command-line argument. This behavior also contradicts the safety statement at `SKILL.md:80`, which says passwords should not be placed in history. ### Attack Path 1. A user follows the documented example and replaces `password` with a valid database password. 2. The resulting command is saved in shell history, captured by logging infrastructure, or exposed through process inspection while it is running. 3. A local user, administrator of a shared logging service, or attacker with access to the affected history or logs retrieves the credential. 4. The attacker connects to the database using the exposed account. 5. The attacker exercises all permissions assigned to that account, potentially including reading, modifying, exporting, or deleting database records. ### Impact Assessment The obtainabl ...[truncated 364 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove all examples that place passwords directly in command-line arguments or password-bearing URLs. - For PostgreSQL, use a protected `.pgpass` file with permissions set to `0600`, a suitable credential manager, or an interactive password prompt. - For MySQL, use `mysql_config_editor` or a protected option file rather than the `-pPASSWORD` form. - For Redis, use a protected configuration or credential mechanism supported by the deployed client instead of `-a password`. - Ensure secrets are not interpolated into commands printed to logs or displayed for confirmation. - Disable or carefully control shell history for emergency commands involving secrets, while recognizing that this does not address process-list or audit-log exposure. - Use dedicated least-privilege database accounts and rotate any credential that may already have been entered using these examples. - Revise the safety rule at `SKILL.md:80` to clarify that password-bearing connection strings are unsafe when supplied directly as visible command arguments. ]]>

other

Warning
Location
SKILL.md:68
Finding
Unbounded Redis KEYS Command Can Disrupt Production Instances<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:68-70` **Vulnerability Type**: Unbounded blocking database operation **Risk Level**: Medium ### Vulnerable Code ```bash redis-cli -h host -p 6379 -a password INFO keyspace redis-cli -h host -p 6379 -a password DBSIZE redis-cli -h host -p 6379 -a password KEYS "*" ``` ### Technical Analysis The `KEYS "*"` command scans the entire Redis keyspace and returns every matching key. Redis processes commands primarily on its main event loop, so this operation can block other requests for a significant period when the database contains many keys. The command is unbounded and conflicts with the skill's stated policy of limiting query results. Because this instruction is presented as a routine exploration command, an operator may execute it against a large production instance without recognizing its availability impact. ### Attack Path 1. An operator or agent follows the skill instructions while connected to a production Redis instance. 2. The instance contains a large number of keys. 3. The operator executes `KEYS "*"`. 4. Redis scans and materializes the entire matching keyspace while delaying other client requests. 5. Application latency increases, requests time out, and the potentially large response can consume additional client or network resources. ### Impact Assessment This issue does not grant additional privileges beyond the connected Redis account. Its primary impact is availability degradation within the selected Redis database or instance. On sufficiently large deployments, it may cause severe latency, application timeouts, excessive network traffic, or a temporary denial of service for applications sharing the instance. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Replace `KEYS "*"` with cursor-based `SCAN`, for example: ```bash redis-cli -h host -p 6379 --scan --pattern '*' ``` - Impose an explicit maximum number of returned keys in the agent workflow. - Process scan results incrementally rather than retaining the entire keyspace in memory. - Warn users before any potentially expensive diagnostic operation on a production instance. - Prefer keyspace statistics such as `INFO keyspace` and `DBSIZE` when individual key names are unnecessary. - Use a restricted diagnostic account and test potentially expensive operations against a staging environment first. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The skill states it is read-only by default and requires confirmation for writes, but later provides restore/import commands that directly change database state without that promised workflow. This mismatch can cause operators or downstream agents to trust the skill as safe while it still documents ready-to-run destructive commands.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The activation phrases are broad enough to match common requests like 'check the database' or 'show me the data,' which can cause the skill to trigger in situations where database access was not intended or where a safer skill would suffice. Because this skill can expose data and includes write-capable workflows elsewhere, overbroad activation materially raises the risk of unnecessary sensitive data access or unsafe operations.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The export and backup examples write files to disk and later sections include restore operations, but the skill does not clearly warn users about local file creation, sensitive data at rest, or the destructive potential of restores. In practice, this can lead to silent data exfiltration to local files, insecure temporary storage, or accidental restoration into the wrong target.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill is presented as a database exploration/query/export tool, but it also includes restore and migration workflows that can modify or overwrite data at scale. In an agent setting, this expands capability from mostly read-oriented inspection to broad write/destructive operations, increasing the chance of accidental or unauthorized data loss.

Static analysis

No suspicious patterns detected.